Giter VIP home page Giter VIP logo

jasmine-junit-runner's Introduction

jasmine-junit-runner's People

Contributors

blalor avatar edeweerd1a avatar jansabbe avatar jdobson avatar olabini avatar stbutler11 avatar torstenhein avatar woutergroeneveldkul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jasmine-junit-runner's Issues

Building the project

First of all, I should say I'm very excited at the prospect of being able to run jasmine tests along with junit tests. Thank you for developing this plugin!

I'm trying to build the project locally (from master) and encountering some test failures. I'm getting this exception:

useJasmineRunnerOnJasmineTestRunnerBeforeAndAfterClass(be.klak.junit.jasmine.JasmineTestRunnerBeforeAndAfterTest)
  Time elapsed: 0.127 sec  <<< ERROR!
java.lang.RuntimeException: Exception while firing After method: runMijAfterOok
        at be.klak.junit.jasmine.JasmineTestRunner.fireMethodsWithSpecifiedAnnotationIfAny(JasmineTestRunner.java
:206)
        at be.klak.junit.jasmine.JasmineTestRunner.run(JasmineTestRunner.java:170)
        at be.klak.junit.jasmine.JasmineTestRunnerBeforeAndAfterTest.useJasmineRunnerOnJasmineTestRunnerBeforeAnd
AfterClass(JasmineTestRunnerBeforeAndAfterTest.java:21)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.mockito.internal.runners.JUnit45AndHigherRunnerImpl.run(JUnit45AndHigherRunnerImpl.java:37)
        at org.mockito.runners.MockitoJUnitRunner.run(MockitoJUnitRunner.java:62)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at be.klak.junit.jasmine.JasmineTestRunner.fireMethodsWithSpecifiedAnnotationIfAny(JasmineTestRunner.java
:200)
        ... 33 more
Caused by: java.lang.AssertionError: unexpected element(s):<[0]> in <[0, 1]>
        at org.fest.assertions.Fail.failure(Fail.java:228)
        at org.fest.assertions.Assert.failure(Assert.java:149)
        at org.fest.assertions.ItemGroupAssert.failureIfUnexpectedElementsFound(ItemGroupAssert.java:107)
        at org.fest.assertions.ItemGroupAssert.assertContainsOnly(ItemGroupAssert.java:79)
        at org.fest.assertions.ObjectGroupAssert.containsOnly(ObjectGroupAssert.java:65)
        at be.klak.junit.jasmine.classes.JasmineTestRunnerBeforeAndAfterClass.runMijAfterOok(JasmineTestRunnerBef
oreAndAfterClass.java:30)
        ... 38 more

My machine is running windows 7. I'm getting this error after downloading the repo and executing:

mvn clean install

Please advise.

Alternatively, is there a mirror that this dependency can be downloaded from so that I don't have to build locally?

Submit to Maven Central?

Hi, Wouter! I discovered your Jasmine JUnit code a couple of days ago and I'm very impressed. I have a couple of pull requests I'm going to send your way that make using the library much easier by packaging all of the resources into the jar, rather than copying the Jasmine and EnvJS stuff into each dependent project. I'm wondering if you'll be deploying this project to the Maven Central repository. I think it's in a very usable state!

envJsOptions.js not found

I ran "mvn package" and I got the following error:

Running be.klak.env.EnvUtilsTest
[ Envjs/1.6 (Rhino; U; Windows 7 x86 6.1; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ]
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.721 sec <<< FAILURE!
initializationError(be.klak.env.EnvUtilsTest) Time elapsed: 0.005 sec <<< ERROR!
org.mozilla.javascript.EvaluatorException: Couldn't read source file "src/test/javascript/envJsOptions.js": src\test\javascript\envJsOptions.js (The system cannot find the path specified). (script#1)
at org.mozilla.javascript.tools.ToolErrorReporter.runtimeError(ToolErrorReporter.java:111)

Code Coverage

Are you interested in trying to incorporate code coverage with JSCover2? There's a rough draft of how it can be done here.

UnknownHostException for file system links to sources

Hi jefklak,

happy to find your project here as an alternative to the jasmine-maven-plugin. I tried to setup everything into my project. I configured my Test class - I think correctly:

@RunWith(JasmineTestRunner.class)
@JasmineSuite(sources = { "lib/jquery-1.7.1.js", "lib/underscore.js", "lib/require-jquery.js", "lib/backbone.js","lib/bootstrap.js", "main.js" }, specs = {"my.spec.js"}, generateSpecRunner = true, sourcesRootDir = "src/main/javascript")
public class MyTest {

...

}

As you can see my specs are depending on some 3rd party stuff.

When I run it, the CLI tells me the following:

[ Envjs/1.6 (Rhino; U; Windows 7 x86 6.1; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ]
failed to open file file://C/:/projectRoot/api/data.js JavaException: java.net.UnknownHostException: C
js: syntax error
js:

JavaException: java.net.UnknownHostException: C


js: .^
....

Now there are two problems with that, which I don't know how to resolve:

  1. the path is wrong. api/data.js is actually situated in src/main/javascript which I actually configured in using the JasmineSuite interface. How come the file path is not reflected. It should be file://C/:/projectRoot/src/main/javascript/api/data.js
  2. I am not sure but why is the test runner throwing an UnknownHostException for file system resources. Am I missing something. It shouldn't try to connect using java.net, right?

I really hope you can point me to something. Let me know if you need my contributions or the like?
Best regards and thank you in advance!

Upgrade to Jasmine 2.0

Hi,

I found your jasmine runner pretty interesting. I tried upgrading the jasmine version to 2.0, but something went wrong. Have someone ever tried it before?

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.