Comments (4)
As I understand there are two issues.
First, the @Category(Runtime.class)
annotation does not prevent JUnit from creating an instance of your test class. This is due to the fact that we use a test runner which is bundled with JUnit (org.junit.experimental.categories.Categories
). This runner or JUnit itself is causing the call to the constructor. I think you can move the code from the contructor to a setup method to avoid this issue. The alternative would be to use a custom test runner, but that may cause trouble in other scenarios.
Second, tests which are not longer contained in a source folder are still executed. Since JUnitLoop listens to compilation events to determine where to find test classes, classes which are not compiled are not added to the test suite that is executed by JUnitLoop. However, since your class was compiled before it is possible that JUnitLoop does not recognize that the class is not part of a source folder anymore. This is a bug, which needs to be fixed. In the meantime you may delete the project 'JUnitLoop' from your workspace. It will automatically be regenerated by JUnitLoop and not contain the test class anymore.
from junitloop.
Ah, I see! Very interesting. I will try deleting the JUnitLoop project and report back here.
With regards to the first issue (constructor calls despite @Category(Runtime.class)
), unfortunately I can't modify the constructor code as it comes from a framework. (It's Play Framework's FunctionalTest if you're interested.) Anyway, I guess there's nothing you can do about this in JUnitLoop -- probably should be raised as a bug on JUnit itself though...
from junitloop.
Yes, deleting the JUnitLoop project after removing those folders from the build path seems to work around the second issue. Thanks!
from junitloop.
I agree regarding the issue with the constructor call.
from junitloop.
Related Issues (17)
- Remove tests from LoopTestSuite when containing projects are deleted or closed
- JUnitLoop does not install on Eclipse 3.8.2 - dependencies does not match HOT 2
- [JLoop] Allow redirecting output to console window when running in same VM
- Add workspace preference page to exclude projects from JUnitLoop test suite
- Add warning to Problems view when a test fails HOT 2
- Test with Eclemma coverage
- JUnitLoop doesn't run any tests
- NullPointerException in JUnitLoop update process (Eclipse Luna upgrade)
- [JLoop] LoopLauncherWrapper code does not compile for runInSameVM()
- Include a 'run test suite manually' mode
- [JLoop] Add surrounding try/catch to generated runner to correctly handle run() methods that throw exceptions
- Typo at the junitloop web home page HOT 1
- Error trying to install JUnitLoop HOT 7
- Tests failed for security exception when using jMock expectations HOT 9
- JunitLoop uses default JDK instead of project JDK resulting in `java.lang.UnsupportedClassVersionError` HOT 5
- Classpath Problems with Maven (m2e-Plugin) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from junitloop.