1- This project shows an example of using the ml -unit-test framework to run server-side tests within MarkLogic.
1+ This project shows an example of using the marklogic -unit-test framework to run server-side tests within MarkLogic.
22
3- ## Enabling ml -unit-test in an ml-gradle project
3+ ## Enabling marklogic -unit-test in an ml-gradle project
44
5- Using ml -unit-test requires two additions to the build.gradle file, as described below.
5+ Using marklogic -unit-test requires two additions to the build.gradle file, as described below.
66
7- First, ml-gradle includes an "mlUnitTest" task, which depends on the ml -unit-test-client JAR file. ml-gradle does not
8- include this by default (not every ml-gradle user will use ml -unit-test), so it must be added to the buildscript:
7+ First, ml-gradle includes an "mlUnitTest" task, which depends on the marklogic -unit-test-client JAR file. ml-gradle does not
8+ include this by default (not every ml-gradle user will use marklogic -unit-test), so it must be added to the buildscript:
99
1010 buildscript {
1111 repositories {
1212 jcenter()
1313 }
1414 dependencies {
15- classpath "com.marklogic:ml -unit-test-client:0.11.1 "
15+ classpath "com.marklogic:marklogic -unit-test-client:0.12.0 "
1616 }
1717 }
1818
19- Next, the ml -unit-test framework is depended on and installed as an "mlRestApi" dependency (the "mlRestApi" configuration
19+ Next, the marklogic -unit-test framework is depended on and installed as an "mlRestApi" dependency (the "mlRestApi" configuration
2020is a feature of ml-gradle for depending on packages of MarkLogic modules):
2121
2222 repositories {
2323 jcenter()
2424 }
2525
2626 dependencies {
27- mlRestApi "com.marklogic:ml -unit-test-modules:0.11.1 "
27+ mlRestApi "com.marklogic:marklogic -unit-test-modules:0.12.0 "
2828 }
2929
3030## Running unit tests
@@ -36,7 +36,7 @@ First, deploy the application:
3636
3737 gradle mlDeploy
3838
39- This will deploy the application along with the ml -unit-test modules.
39+ This will deploy the application along with the marklogic -unit-test modules.
4040
4141Then, run the tests:
4242
@@ -45,17 +45,17 @@ Then, run the tests:
4545Two tests are run, and one should fail, so you can see what a failed test looks like.
4646
4747This project includes the Gradle Java plugin, which allows you to run tests under src/test/java. This project includes
48- an example of a JUnit Parameterized test that invokes each ml -unit-test module separately - you can try it like this:
48+ an example of a JUnit Parameterized test that invokes each marklogic -unit-test module separately - you can try it like this:
4949
5050 gradle test
5151
5252Again, two tests will run, and one will intentionally fail. The Parameterized test can be run in an IDE as well, allowing
5353you to take advantage of your IDE's support for JUnit tests.
5454
55- You can also access the ml -unit-test REST endpoints directly:
55+ You can also access the marklogic -unit-test REST endpoints directly:
5656
57- - List the tests - http://localhost:8135/v1/resources/ml -unit-test
58- - Run a test suite - http://localhost:8135/v1/resources/ml -unit-test?rs:func=run&rs:suite=My%20Tests
57+ - List the tests - http://localhost:8135/v1/resources/marklogic -unit-test
58+ - Run a test suite - http://localhost:8135/v1/resources/marklogic -unit-test?rs:func=run&rs:suite=My%20Tests
5959
6060And you can run the original UI test runner by going to:
6161
0 commit comments