New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for JSTestDriver #10

Open
eriwen opened this Issue Jan 11, 2012 · 4 comments

Comments

Projects
None yet
2 participants
@eriwen
Owner

eriwen commented Jan 11, 2012

Could consider this project:
http://code.google.com/p/jstd-maven-plugin/

But taking care to exclude transitive dependencies:
http://code.google.com/p/jstd-maven-plugin/issues/detail?id=5

@ghost ghost assigned eriwen Mar 10, 2012

@ki82

This comment has been minimized.

ki82 commented Sep 14, 2012

Any progress on this?
We are switching to gradle and would love to have support for jsTestDriver :)

@eriwen

This comment has been minimized.

Owner

eriwen commented Sep 14, 2012

I have part of the work done on this, but certainly not ready yet. In the meantime, I run JSTestDriver with Gradle this way:

task jstd(type: Exec, dependsOn: 'init', description: 'runs JS tests through JsTestDriver') {
    // Default to MacOS and check for other environments
    def firefoxPath = '/Applications/Firefox.app/Contents/MacOS/firefox'
    if ("uname".execute().text.trim() != 'Darwin') {
        firefoxPath = "which firefox".execute().text
    }

    commandLine = ['/usr/bin/env', 'DISPLAY=:1', 'java', '-jar', "${projectDir}/test/lib/JsTestDriver-1.3.3d.jar", '--config', "${projectDir}/test/jsTestDriver.conf", '--port', '4224', '--browser', firefoxPath, '--tests', 'all', '--testOutput', buildDir]
}

I know it sucks, but hey, it works well. You can even get code coverage with my lcov to cobertura XML tool:

task jsCoverage(type: Exec, dependsOn: 'jstd', description: 'JS code coverage with cobertura') {
    commandLine = ['python', "${projectDir}/test/lib/lcov_cobertura.py", '-b', "${projectDir}/", '-e', 'test.spec', '-e', 'test.lib', '-o', "${buildDir}/coverage.xml", "${buildDir}/jsTestDriver.conf-coverage.dat"]
}

⚡️

@ki82

This comment has been minimized.

ki82 commented Sep 18, 2012

Thanks for the examples, do you have any rough estimate, a couple of months, a year?

We have actually been using your lcov to cobertura XML tool for the last 6 months(from ant) and love it, so thanks for that aswell :)

@eriwen

This comment has been minimized.

Owner

eriwen commented Sep 18, 2012

@ki82 This is realistically a few months away as I have some more pressing work I need to finish.

Glad you like the lcov tool :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment