-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
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.
2 | No.2 Revision |
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...
3 | No.3 Revision |
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...