You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "stephen mallette (JIRA)" <ji...@apache.org> on 2016/01/08 01:50:39 UTC

[jira] [Commented] (TINKERPOP-1076) Gremlin Tests cannot be executed individually

    [ https://issues.apache.org/jira/browse/TINKERPOP-1076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15088499#comment-15088499 ] 

stephen mallette commented on TINKERPOP-1076:
---------------------------------------------

The best you can do is set the `GREMLIN_TEST` environment variable:

http://tinkerpop.apache.org/docs/3.1.0-incubating/developer.html#_building_and_testing

other than that i don't think this can be resolved with respect to the gremlin-test based tests (you should be able to run regular unit tests individually in the IDE).  I think we'd all welcome a solution if you had one. 

> Gremlin Tests cannot be executed individually
> ---------------------------------------------
>
>                 Key: TINKERPOP-1076
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1076
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: test-suite
>    Affects Versions: 3.1.0-incubating
>         Environment: Gremlin 3.1.0-Incubating, JDK 8, Eclipse Mars, JUnit 4, Gradle (Dependency Management)
>            Reporter: Martin Häusler
>
> h2. General description
> Using the Eclipse plugin for JUnit, it's easy to run test suites, and then pick a single failed test from the results (for debugging purposes) and execute only that particular test. If I try that, I get the exception below.
> h2. Exception Stack Trace
> {code}
> java.lang.NullPointerException
> 	at org.apache.tinkerpop.gremlin.AbstractGremlinTest.setup(AbstractGremlinTest.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> 	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> {code}
> h2. Reproduction Steps
> In Eclipse (maybe this works in other IDEs as well, not sure), run the whole gremlin structure test suite until it finishes. Then, in the JUnit view, select a test class (e.g. {{org.apache.tinkerpop.gremlin.structure.util.detached.DetachedGraphTest}}), right-click it, and select "run". It fails with the given exception. The same thing holds true if an individual test method is selected.
> h2. Rationale
> I have to run the whole suite just to get to a particular test which is tedious for debugging, because breakpoints are likely to be hit by other (passing) tests as well, so I potentially have to skip over lots and lots of breakpoints until I finally arrive at the test I intended to debug. Plus, it's general good test design if each test is executable independently.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)