Web UI Unit Testing - fieldenms/tg GitHub Wiki

The following information on how to create and execute Web UI unit test has been moved from a comment on issue #106 to this wiki page to facilitate its accessibility.

Web UI unit test can be executed manually. In future these tests are planned to be put on maven runner to be used in CI tools.

  1. Domain extension.
    1. Create test entities in package ua.com.fielden.platform.sample.domain in the src/main/java source root in the platform-pojo-bl.
    2. In companion object implementations, provide the createFetchProvider method if necessary.
  2. Db recreation.
    1. Use ua.com.fielden.platform.web.test.server.PopulateDb from platform-web-resources.
    2. Add domain population logic for testing if necesary.
  3. TG test server start.
    1. Use ua.com.fielden.platform.web.test.server.Start from platform-web-resources.
    2. Add any Web UI specific logic (i.e. masters, centres registration) to ua.com.fielden.platform.web.test.server.WebApp, if necessary.
  4. Web UI tests start.
    1. Visit https://tgdev.com and log in.
    2. Visit https://tgdev.com/resources/tests.html, which will start running all tests.
      • See platform-web-ui/src/main/web/ua/com/fielden/platform/web/tests.html.