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
1
vote
1 answer

RequireJS module shim not working when testing via Jasmine

I have a JavaEE project that uses RequireJS to load a few third party frameworks. One of those frameworks is OpenLayers3. Openlayers3 natively creates a global "ol" variable. However, OpenLayers3 is written to be AMD compatible and works as a module…
1
vote
2 answers

jasmine-maven-plugin load some other test utilities common script

I have multiple tests that need to share the same common utilities script. I wouldn't want to place this file in the source folder structure, since it's only relevant for testing. So my source folder…
Vlad Mihalcea
  • 142,745
  • 71
  • 566
  • 911
1
vote
1 answer

What should I write unit tests for in Jasmine?

I am working in reverse in a system lifecycle. A few months ago I wrote a large javascript library. I then had to make it all objective and now, I have to write unit tests for it. I am using Maven and have the jasmine-maven-plugin in my pom.xml. The…
Patrick
  • 6,495
  • 6
  • 51
  • 78
1
vote
1 answer

Why is my jasmine with a specified browserVersion not failing?

I have set up jasmine tests for my app. In my app I have javascript that shouldn't work in IE8 : var foo = Object.create(Array.prototype); When I run mvn jasmine:bdd and I open the test page in Internet Explorer (with browserMode set to Internet…
Noremac
  • 3,445
  • 5
  • 34
  • 62
1
vote
1 answer

jasmine-maven-plugin: manage dependencies and separate spec execution

I have a legacy web application that have bunch of javascript files. Those files need to be loaded in order and some of them may have duplicate global functions, and all other bad stuffs. I created javascript modules, which I would like to test with…
cfreak
  • 11
  • 1
  • 1
1
vote
1 answer

Jasmine having better modularity

I am a newbie to jasmine, please correct me if I am asking a wrong question. I am working on a legacy system which has a lot java script code. I would like to write some tests for the same. Initially I thought of using buster since it's in beta I…
MSK
  • 11
  • 3
1
vote
1 answer

JavaScript unit testing with Jasmine and Maven 2.x

I am using Jasmine to test my javascript. I run the jasmine scripts with the maven build. I am using maven 2.0.11. When i run the maven build the jasmine throws below error, [FATAL ERROR] com.github.searls.jasmine.TestMojo#execute() caused a linkage…
AJJ
  • 3,570
  • 7
  • 43
  • 76
1
vote
0 answers

How to integrate testacular in a maven regular build with jasmine

I just want to run a testacular unit test in a regular maven build. I already have a jasmine build working on my project and I would like to integrate browser object from testacular to test the UI of my application. Is it possible or do I must use…
X-Blaster
  • 1,751
  • 3
  • 15
  • 32
0
votes
0 answers

How does this Jasmine unit test mock call work?

What is the difference between these two: First version: it('Expect foo', function() { var response = [{'fizz': 'buzz'}]; var jsonString = JSON.stringify(response); spyOn($, 'ajax').and.callFake(function(e) { …
0
votes
1 answer

Use WebDriverManager with jasmine-maven-plugin to use Chrome Headless

I have a Maven project configured with jasmine-maven-plugin to run javascript tests. I'd like to switch from Phantomjs to Chrome headless without downloading and setting the driver's path executable. I've found WebDriverManager could help, but it…
0
votes
1 answer

Jasmine maven plugin parsing test result Atlassian Bamboo

So I've managed to get jasmine maven plugin to work with maven and our js unit test. All is running well, but i found when there's a test that failed, bamboo will say it failed, but the error is "No failed tests found, possible compilation error…
woof
  • 119
  • 2
0
votes
1 answer

Jasmine Maven plugin: Custom directive test not working (injector: nomod)

I've searched for answers on this on the internet for a while. It concerns testing an AngularJS custom directive, using external templateUrl stored in a html-file, in Maven build. (After getting it to work successfully on Karma) There is a lot of…
0
votes
1 answer

"spyObj.plan is undefined" in Jasmine test

I'm having a method called doLogin that calls another method login from another object. doLogin : function(data) { var userMgtRequest = new UserMgtRequest(); userMgtRequest.setLoginId(data.username); …
0
votes
2 answers

jasmine-maven-plugin + phantomJS : Error: [$injector:nomod]

I create a project with : mvn archetype:generate -DarchetypeGroupId=com.github.searls -DarchetypeArtifactId=jasmine-archetype -DarchetypeVersion=1.3.1.5 -DgroupId=com.acme -DartifactId=my-jasmine-project -Dversion=0.0.1-SNAPSHOT First I test with…
user3085897
  • 43
  • 1
  • 6
0
votes
0 answers

John Papa "Y165" and Tests

My project has a structure like the Y165 Recommendation of John Papa. The web project works fine (So my app.modile.js is correct and my modules statements are too). The problem is with the tests. I use jasmine-maven-plugin with PhamtomJS (before the…
user3085897
  • 43
  • 1
  • 6