Skip to content

Web UI Unit Testing

nazchk edited this page Jul 29, 2019 · 3 revisions

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.
  2. Use ua.com.fielden.platform.sample.domain package in src/main/java source folder from platform-pojo-bl module to create testing entities (use eclipse plugin to make it properly!).
  3. Implement createFetchProvider method for concrete companion objects if necessary.
  4. Db recreation.
  5. Use ua.com.fielden.platform.web.test.server.PopulateDb from platform-web-resources.
  6. VM arguments: -Djava.system.class.loader=ua.com.fielden.platform.classloader.TgSystemClassLoader
  7. Add if necessary any domain population logic for testing.
  8. TG testing server start.
  9. Use ua.com.fielden.platform.web.test.server.Start from platform-web-resources.
  10. VM arguments: -Djava.system.class.loader=ua.com.fielden.platform.classloader.TgSystemClassLoader
  11. Add if necessary any Web UI specific logic (i.e. masters, centres registration) into ua.com.fielden.platform.web.test.server.WebApp.
  12. Web UI tests start.
  13. Open browser with https://tgdev.com:9999/resources/tests.html URI (all tests in one runner).
  14. 'TODO needs to be updated'.
Clone this wiki locally