Skip to content

Setup Test Resources

Scott A. Stafford edited this page Mar 14, 2017 · 4 revisions

If the mlTestRestPort property is specified in your gradle.properties file and given a port number value, then the next time you deploy your MarkLogic application, the following additional resources are created.

  • Test Database labelled mlAppName-test-content
    • The database properties are a replica of _mlAppName-content
  • Test Application Server labelled mlAppName-test
    • The application server properties are a replica of mlAppName
    • The database points to mlAppName-test-content
    • The modules database points to mlAppName-modules

An external test framework would delete all or a subset of content from the test database after each test execution. Asserts would be made on the state of the test content database after each run.

Gradle can also be used to execute Java unit tests through the Java plugin. The ml-junit project gives you the capability to reset your test content database along with Assert statement to test your database state after each run.

Clone this wiki locally