Questions tagged [jasmine-maven-plugin]

The maven plugin jasmine-maven-plugin helps you to execute your jasmine test scripts as part of a maven build.

Jasmine is a behavior-driven development framework for testing JavaScript code. To find out more about Jasmine have a look at http://pivotal.github.com/jasmine/

To run Jasmine test as part of your maven build this plugin might help you. There are two uses for this plugin (after you have added it to your project):

  • prepare the you jasmine test scripts to be run in a browser so you can interactively test them with mvn jasmine:bdd

  • run the tests as part of the maven build using HtmlUnit when you run mvn test

For more information: http://searls.github.com/jasmine-maven-plugin/

38 questions
73
votes
8 answers

Redirect calls to console.log() to standard output in Jasmine tests

I'm using Jasmine via the jasmine-maven-plugin, and I would like to see console.log() messages in the Maven build output. Is there a way to achieve this? If console.log() cannot be redirected, is there any other way to log from my tests so that they…
Lóránt Pintér
  • 10,152
  • 14
  • 47
  • 53
11
votes
2 answers

Can a Maven plugin see the "configuration" tag from an "execution" section automatically?

I'm analyzing a Maven plugin that I can configure inside the configuration section of plugin: ... ...
MaDa
  • 10,511
  • 9
  • 46
  • 84
5
votes
1 answer

How to get Sonar to report both Java and JavaScript tests run by Maven

Our project uses Maven as the build tool and we are using Sonar to track quality. JUnit tests are executed by SureFire and the results are displayed in Sonar. We've added some JavaScript tests which are run by the jasmine-maven-plugin and want to…
Sean Connolly
  • 5,692
  • 7
  • 37
  • 74
5
votes
1 answer

angular-mock.js conflicts with htmlunit? How to test angular application using angular-mock.js in maven-jasmine

I'm new to maven and jasmine, and I have a problem setting up maven to run unit tests on an angular application. I get into trouble as soon as I add angular-mocks.js to the test/javascript/lib folder. mvn test throws a htmlunit.ScriptException just…
5
votes
1 answer

Jasmine Maven Plugin including my scripts using file protocol

I'm trying to add javascript unit testing to our project and found out about the Jasmine Maven Plugin. I followed the directions and ended up with this in my pom.xml: com.github.searls
dnc253
  • 39,967
  • 41
  • 141
  • 157
4
votes
0 answers

How to set up JASMINE using MAVEN-PLUGIN?

I have a folder structure like -root -pom.xml -service -web -pom.xml -src -main -test -java -javascript -lib -specRunner.js …
Subhranshu
  • 435
  • 2
  • 12
4
votes
0 answers

Error loading JavaScript with jasmine-maven-plugin within Jenkins

I am somewhat frequently receiving the following error loading javascript internal to our application while running Jasmine tests using the jasmine-maven-plugin. This seems to only happen when run in our CI environment (Jenkins) and does not happen…
Jenna Pederson
  • 5,656
  • 1
  • 19
  • 20
3
votes
0 answers

No plugin found for prefix 'jasmine' in the current project

I get No plugin found for prefix 'jasmine' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/patthia/.m2/repository), central…
ashy143
  • 169
  • 11
3
votes
1 answer

How to reference packaged resources from the jasmine maven plugin?

I want to use the jasmine-maven-plugin to test my maven my-webapp project. This project depends on another my-lib project that contains some required JavaScript libraries. When the my-webapp project is built, it adds the my-lib JAR to the…
Jordão
  • 55,340
  • 13
  • 112
  • 144
3
votes
1 answer

How to test jQuery UI Dialog during headless execution

Our app uses jQuery dialogs for modal popups. We're trying to write some unit tests for our javascript, and part of this is the creation of the dialogs. We're using Jasmine and the Jasmine Maven plugin. When running the tests in a browser, it all…
dnc253
  • 39,967
  • 41
  • 141
  • 157
3
votes
1 answer

Jasmine maven plugin and jasmine-jquery different results

My project is standard maven java project. I'm trying to include jasmine-maven plugin to my CI. But when I run command mvn clean install, it runs the tests correctly. However, if I run mvn jasmine:bdd and run the test from the browser. My html…
toy
  • 11,711
  • 24
  • 93
  • 176
3
votes
3 answers

running jstd-maven-plugin tests without a browser

I've got jsTestDriver up and running, and I use jstd-maven-plugin to run the tests during a build. The plugin needs a browser to be specified in order to work though, and I'd like to use something like rhino or htmlunit that won't actually launch…
2
votes
1 answer

jasmine-maven-plugin load source files and their dependencies

I've got a bunch of javascript files I'd like to test, located in src/main/webapp/js, but when I try to build on the command line, I get a bunch of errors due to the missing library files that each of my source scripts depend upon. I am trying to…
user1429419
  • 127
  • 3
  • 12
2
votes
2 answers

Setting up jasmine-maven-plugin failures to make jenkins unstable

I'd like to configure jasmine-maven-plugin to make jenkins unstable if a test fails but the only options appear to be: set haltOnFailure true and have failures break the build set haltOnFailure false and have failures reported in the logs but the…
Sam Hasler
  • 12,344
  • 10
  • 72
  • 106
1
vote
0 answers

Unresponsive MicrosoftWebDriver Server for Edge while running Selenium Automation testing for Edge

I am trying to run selenium web test for Microsoft Edge browser, using Jasmine maven plugin. All the required jars (Selenium edge driver) and microsoftWebDriver for Edge are in place. However, I am getting some timeouts when running the test. Below…
1
2 3