I'd like to find some new conceptual ideas, but specific solutions are welcome.
Technologies
- Versioning System: SVN
- Continuous Integration Tool: TeamCity
- Agent: Windows (no admin rights!)
- Language: Java
- WebDriver: InternetExplorerDriver
- Testing: JUnit
- Build: ant
Problem
If someone stops a configuration (line in TeamCity GUI) while it is running, the afterClass
method is not executed (it closes the browser) and the browser becomes residual.
Structure
(beforeClass
starts the driver and afterClass
closes it)
Flow
( where you see a red arrow, someone stops the configuration -> E.g.: (s)he observed that a test failed and wants to run it again, but it produces a residual browser because afterClass
is not executed )
Previous attempts
- Go to the agent and restart it manually ( 1 time / 1-4 weeks ) - works, but has important disadvantages
- Go to the agent and tried to use
taskkill
andtaskkill /F
- doesn't work - Other Java attempts (to run a "cleaner" before the tests - native Windows commands), but without success
Do you have any ideas? They can be related to the agent, TeamCity, Java code, ant, specific configurations, etc.