Skip to content

integrate with something like ci-testling or jepso-ci #10

Open
millermedeiros opened this Issue Jan 12, 2013 · 7 comments

2 participants

@millermedeiros
Modular JavaScript Utilities member

we should use http://ci.testling.com/ to make it easier to spot errors/regressions, that way travis is used for node.js and testling for browser tests.

PS: I already started the development.

@millermedeiros
Modular JavaScript Utilities member

not working properly so I reverted the commits, see: http://ci.testling.com/mout/mout

it seems that testling have some conflict with RequireJS, one solution that I could think of was to only use named modules for the specs (PITA) and load the specs as regular scripts on testling. Not sure if that will work and I won't have enough time to do it today.

I created a branch testling with the implementation and disabled the commit hook for now.

PS: I contacted the browserling team describing the issue.

@conradz
Modular JavaScript Utilities member
conradz commented Jan 21, 2013

IMO using regular require calls for the specs would be OK, and would be simpler than using named modules. It's not like the specs have to be depended on or referenced by other modules. This could work with loading with regular script tags.

require(['mout/my/function'], function(func) {
    // do test code
});

It would be much better to make testling Just Work, but this might be an OK compromise.

@millermedeiros
Modular JavaScript Utilities member

after a lot of trial and error I got it to work... testling doesn't actually support loading scripts dynamically, it bundles all the files together into a single JS that's why RequireJS was failing (it couldn't locate the files). For now I will use http://rawgithub.com to load the specs and source code since testling also messes up with the encoding of the bundled files (it doesn't use UTF-8 so all the special chars tests fails).

@millermedeiros millermedeiros added a commit that referenced this issue Feb 28, 2013
@millermedeiros millermedeiros Jasmine TAP Reporter and ci.testling.com integration. see #10
load specs and source files from rawgithub.com since testling can't load
dynamic resources that are relative to the project folder (it needs to bundle
everything into same script file).

we are also not doing a r.js optimization since testling doesn't seem to use
UTF-8 and it causes issues with a few tests that uses special chars.
d81f5f3
@millermedeiros
Modular JavaScript Utilities member

works!!! http://ci.testling.com/mout/mout

now need to fix #47 as soon as possible...

@millermedeiros
Modular JavaScript Utilities member

damn, the badge is being cached by github CDN (because it isn't https) and the tests sometimes timeout... will investigate alternative services and/or get in touch with the testling devs.

@millermedeiros
Modular JavaScript Utilities member

just talked with substack about the encoding problem and I found out how to fix it! He said the change should be live soon. - Charles Proxy saving the day once again, I used it to rewrite the response header to content-type: application/javascript; charset=utf-8 and it seems to fix the problem.

he also said that testling uses npm to download/install the package so we can use a preinstall hook to generate the bundled files, but unfortunately testling doesn't provide any environment vars like process.env.TRAVIS so we could toggle the behavior (at least not for now). npm changed the way the prepublish hook works on v1.2.0 (so now it is also executed on npm install <noargs>) but it seems that ci.testling is still using an older version. I will try to figure out a way to make it work (maybe do a postinstall script that checks if the tests folder exists and generate the testling bundle if so).

@millermedeiros millermedeiros added a commit that referenced this issue Feb 28, 2013
@millermedeiros millermedeiros try to use a postinstall hook for ci.testling. see #10
the hook generates "bundles" with all source files and specs to avoid a timeout
and circunvent testling limitations.
19a569e
@millermedeiros
Modular JavaScript Utilities member

the postinstall script worked. now they just need to to fix the badges caching and the encoding of the HTML file (some tests are failing on IE7 because of that).

alternatives:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.