This is the JUnit Plugin of jQAssistant. It enables jQAssistant to scan and to analyze JUnit related artifacts like:
-
JUnit 5 test cases
-
JUnit 4 test cases
-
JUnit 3 test cases
For more information on jQAssistant see https://jqassistant.org.
Home Page: http://jqassistant.org/
License: GNU General Public License v3.0
This is the JUnit Plugin of jQAssistant. It enables jQAssistant to scan and to analyze JUnit related artifacts like:
JUnit 5 test cases
JUnit 4 test cases
JUnit 3 test cases
For more information on jQAssistant see https://jqassistant.org.
For a particular project we have a rule in place which disallows direct dependencies on certain types, except from tests.
This works nicely, except where there are inner classes inside Test classes, in which case a false positive warning of an illegal dependency is reported.
A minimal example is this class:
public class ExampleTest {
@Test
public void testBasics() {
new InnerExample();
}
class InnerExample {
public InnerExample() {
new DontDependOnMeOutsideOfTests();
}
}
class DontDependOnMeOutsideOfTests { }
}
With the corresponding constraint
<constraint id="example:nodep-on-sometype">
<cypher><![CDATA[
MATCH (source:Type)-[r:DEPENDS_ON]->(target:Type {name:"ExampleTest$DontDependOnMeOutsideOfTests"})
WHERE NOT source:Test
RETURN source as OffendingType, target as DependsOnType
]]></cypher>
</constraint>
This reports a constraint violation, even though it's called clearly from within a test. I will open a PR in a minute.
Remove this hint: these checkboxes can be checked like this: [x]
We have some test cases that use the Enclosed test runner. These classes are not labeled with Test. It might be helpful to have a concept to label all classes that use the @RunWith
annotation as Test.
I will open a PR in a minute to illustrate the issue.
According to the XSD and the files junit4.xml
and metric.xml
there is also a metricGroup
and metric
element available. What are these for and what is the difference to the metric concepts available in the metric.xml
? The documentation doesn't describe these elements.
I, as user of jQAssistant, who is using a JUnit version sincee 5.9,
would like to be able to query also test reports written in the Open Test Report format,
to that I can also test report information written in the new format.
To test this feature, it should be enough to import some example reports in the Open Test Report format.
We introduce support of Junit 5 via #2. During the implementation of the Junit 5 support it turned out that we are unable to create the relations DEFINED_BY
and IMPLEMENTED_BY
between the test cases reported in the XML report and the Java methods for repeated and annotated test. The cause is a bug in Junit 5, already reported as junit-team/junit5#1182.
If junit-team/junit5#1182 will be fixed we should update or adapt the Junit plugin of jQAssistant.
Related issues: junit-team/junit5#1182 and #2.
Go over all documents of the documentation and unify the Asciidoctor markup.
Assertions usually come with a test framework like JUnit4 or 5 but others may provide their own assertions, e.g. AssertJ, Hamcrest or Mockito. Therefore any constraints depending on assertions (e.g. junit:TestMethodWithoutAssertion) should require an abstract concept which can be provided by plugins for different frameworks.
Currently, the constraint junit:AssertionMustProvideMessage
is part of the junit:Default
although, it's implementation is jUnit4-specific. This is due to following two facts:
junit4:AssertMethod
When using jUnit4 and jUnit5 at the same time (not saying that this is okay), jUnit 5 Assert methods will be always reported by this constraint becuase the message will be the last parameter.
There are three options:
:JUni4:Assert
My preference would be option 1. Any opinions?
The junit5:AssertMethod
concept does not support all assert methods from jUnit 5, thus leading to false positives in the constraint junit:TestMethodWithoutAssertion
constraint. This is due to the fact that assert methods are considered as such if the have the following signature void assert.*
Following methods will not be matched:
JUnit 3 is quite old and after adding support for Junit 5 we should drop the support of Junit 3.
The fail()-Method of JUnit 4/5 is currently not being recognized as assertion, therefore false-positives are reported. For implementation #23 should be considered as a pre-requisite.
As core developer of jQAssistant, I want this project to be build on various plattforms with different JDK versions on each commit, so that I know if the change done my the commit does not break the build and the software is fully functional.
The following acceptance criterias must be met:
mvn -DskipTests -Djqassistant.skip clean install
must passmvn -Djqassistant.skip clean install
must passmvn -P IT clean install
must passmvn -DskipTests -Djqassistant.skip=false clean install
must passMigrate the existing documentation of the JUnit Plugin to the new reference manul.
Hi,
are there any plans for supporting JUnit 5 in the next Version?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.