I need to close the selenium, and to invoke logout when the scenario is ends.
in my case it happens when the jsystem close the tests jvm (there one jvm for
the whole scenario)
is there is any suck hook ?
In 'jsystem.properties' file, set 'run.mode' property to '4'...
The JRunner has three execution modes:
and cause an execution failure, thus a new JVM is spawned for each test.
As a result, when implementing 'Drop every test' special considerations must
be made for extended
running time as well as the fact that data cannot be shared using JVM heap
In order to relieve these two limitations 'Drop every scenario' was developed,
in this run mode a JVM
is allocated for each sub-scenario, so that tests in the same sub scenario can
share the JVM
heap space and execution, greatly increasing test execution speed.
Default Value = Drop every run
I need hook for each time that the jsystem "kills" the tests jvm.
without any relation to jsystem "run mode" value.
the reason that I need it, is because I want to create automatically logout
when the jsystem kill the selenium server and client, which happens when it
kills the tests jvm.
If we create scenario, we can add in the end of the scenario "logout" test
that can do it. but the QA and R&D engineers use the jsystem and can create
their own scenarios, without invoking the logout test.
I want hook, which invokes the logout method before the jsystem kills the jvm
tests. in such case the jsystem handles automatically the logout issue.
Nizan Freedman Sheinfine
Use JAVA shutDownHook
implement a thread class of your own.
in your system object \test code add: