Revision history [back]

click to hide/show revision 1
initial version

answered 2019-01-02 09:53:34 +0800

cor3000 gravatar image cor3000

short answer: you don't ... zats will start the whole server for you and 'know' the random port. You don't need to (and you can't) start the server yourself next to a zats test.

Zats will run an embedded Jetty with your application. By doing so it has access to the same memory as your application and gets direct access to the components/controllers/viewmodels you want to test, when using ZATS.

If you want do test your own glassfish (or different server) server you need to use a different testing tool such as Selenium or Testcafe.

short answer: you don't ... zats will start the whole server for you and 'know' the random port. You don't need to (and you can't) start the server yourself next to a zats test.

Zats will run an embedded Jetty with your application. By doing so it has access to the same memory as your application and gets direct access to the components/controllers/viewmodels you want to test, components'( internal state/controllers/viewmodels). That's the purpose/benefit when using ZATS. ZATS - you can test the behavior of your application independent of a browser and without the overhead of a remote connection. The downside is you have to make your application (or parts of it) in the embedded Jetty. e.g. by providing a WEB-INF folder with of your testing web.xml. As demonstrated in this example

The webapp folder and the WEB-INF folder don't have to be in the same subdirectory so you can test different configurations (e.g. using mocks) easily.

If you want do test your own glassfish (or a different application server) server you need to use a different testing tool such as Selenium or Testcafe.Selenium/Testcafe/Sahi...

short answer: you don't ... zats will start the whole server for you and 'know' the random port. You don't need to (and you can't) start the server yourself next to a zats test.

Zats will run an embedded Jetty with your application. By doing so it has access to the same memory as your application and gets direct access to the components'( internal state/controllers/viewmodels). That's the purpose/benefit when using ZATS - you can test the behavior of your application independent of a browser and without the overhead of a remote connection. The downside is implication is: you have to make run your application (or parts of it) in the provided embedded Jetty. e.g. by providing a WEB-INF folder with of your testing web.xml. As demonstrated in this example

The webapp folder and the WEB-INF folder don't have to be in the same subdirectory so you can test different configurations (e.g. using mocks) easily.

If you want do test your own glassfish (or a different application server) server you need to use a different testing tool such as Selenium/Testcafe/Sahi...

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More