https://github.com/daaain/guard-jasmine2junit
A script that converts output from Guard-Jasmine to the XML format used by JUnit. This allows for running tests on continuos integration servers like Jenkins, complete with test reports!
https://github.com/daaain/guard-jasmine2junit
Last synced: about 1 year ago
JSON representation
A script that converts output from Guard-Jasmine to the XML format used by JUnit. This allows for running tests on continuos integration servers like Jenkins, complete with test reports!
- Host: GitHub
- URL: https://github.com/daaain/guard-jasmine2junit
- Owner: daaain
- Created: 2012-10-03T13:33:53.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-10-29T16:49:49.000Z (over 13 years ago)
- Last Synced: 2024-10-06T03:24:07.651Z (over 1 year ago)
- Language: Ruby
- Size: 118 KB
- Stars: 0
- Watchers: 50
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Guard-Jasmine2JUnit
===================
A script that converts output from Guard-Jasmine to the XML format used by JUnit. This allows for running tests on continuos integration servers like Jenkins, complete with test reports!
## Prerequsites
### Ruby environment + Guard-Jasmine
Install guide: https://github.com/netzpirat/guard-jasmine#installation
Usage: https://github.com/netzpirat/guard-jasmine#usage
For Grunt based environments / build chains this seems like a good alternative: https://github.com/jasmine-contrib/grunt-jasmine-runner
### PhantomJS
Install guide: https://github.com/netzpirat/guard-jasmine#phantomjs
Massive caveat: Jenkins doesn't source the PATH from `~./profile` or `/etc/profile` or anywhere meaningful it seems, so in order to be able to use Homebrew installed PhantomJS you'll have to manually paste the contents of your $PATH (for example `/usr/local/bin:$PATH` + rbenv or rvm related bits if needed) into Jenkins Dashboard > Manage Jenkins > Configure System > Global properties / Environment variables > PATH.
## Command line execution
Running the test suite and generating the report can be as easy as one line in the Terminal:
`bundle exec guard-jasmine -p 8888 -u http://localhost:8888/ --console=never 2>&1 | guard-jasmine2junit.rb`
…unfortunately it's a no go on Jenkins as it can't handle piping so on to:
## Using Ant
```
```
You should only use `failonerror="true"` if you want the build to fail on any error, otherwise use the Jenkins [Performance Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Performance+Plugin) to set warning and fail thresholds.