selenium - Dealing with multiple JUnit test cases -
I am writing the case of the JUNET test using the Selenium Web driver, and while trying to do many tests, I Here is an example of my code structure in a file running in the following:
Public class exampleScripts SeleneseTestCase Expands {Public Zero Set Up} Exceptions thrown {SeleniumServer seleniumServer = new SeleniumServer (); SeleniumServer.start (); Set up ("https: //my.target.URL", * Firefox ");} @Test Public Zero Test 1 () throws exceptions {// Test stuff Try {// Check that the results are good} Catch (Throwable E) {// Handle Error}} @Test Public Wide Test 2 () Exceptions thrown {// Try more test content {// check result} Catch (throbable e) {// handle error}}} Now, self-tests work correctly, but I'm getting the error initiated Failure to run: SocketListener1@0.0.0.0: 4444 When my class runs perfectly, but secondly, I go ahead in the next exam, it seems that trying to start the session again When I want to keep it in the old session, how do I get this issue?
It seems that I was able to find an infinite work for this problem, though I ' A. It is not recommended I have created a test_suite function to run all of my tests, and log the results yourself.
Public Zero Set Up () {// setup stuff} Public Null Test All () exception throws {selenium.open ("my / target / path"); Test1 (); Test2 (); } @Test Public Zero test1 () throws exception {// test content {// check result} catches (iron e) {log. INFO ("there was an error in test1"); }} // and so on The entire test suite will run on testAll (). Again, this solution will not recommend because it does not take advantage of the logging of the junket, but it works for me.
Comments
Post a Comment