Java and JavaScript Utilities to embed QUnit tests in JUnit tests via HTMLUnit.
These utilities used to test the Nextweb JavaScript API implementation provided by Appjangle using opsunit.
Link the Maven dependency:
<dependency>
<groupId>com.appjangle.qunit</groupId>
<artifactId>java-qunit</artifactId>
<version>[0.0.3,)</version>
</dependency>
Add Maven repository:
<repository>
<id>Appjangle Releases</id>
<url>http://maven.appjangle.com/appjangle/releases</url>
</repository>
Create a new HTML page with QUnit tests (see example) in src/main/resources
.
Create a new JUnit test in src/main/test
and add this statement to the test:
QUnit.run(this, "qunit_example.html");
(see TestQUnitEmbedding.java)
If any of the QUnit tests fail, the respective JUnit test case will fail as well.