How can I programmatically control the start and stop of Selenium RC

I am currently using selenium using HTMLSuite. The command that I run to start the server and run testuite is shown below

java -jar selenium-server.jar -htmlsuite "*iexplore" "http://localhost:8080" "C:\test\testsuite" "C:\test\result_%Yr%%Mth%%Day%.html"

I have several tests that contain some sql scripts that need to be run first. The sequence of the way I want to start them is shown below.

run sql script 1
run testsuite 1
run sql script2
run testsuite 2
run sql script 3
run testsuite 3

It is not possible to run sql script can not at the same time, so I have to run one script, run selenium tests and continue from the next.

I plan to put these commands in a Windows batch file, but I'm not sure how to stop the selenium server. The sequence of events in a batch job looks like this:

run sql script1
start selenium server
run testsuite 1
stop selenium server
run sql script 2
start selenium server
run testsuite 2
stop selenium server
run sql script 3
start selenium server
run testsuite 3

My questions really are: -

  • How to stop a selenium server from a Windows batch job.
  • , . . , ?
+3
1

, , .

+2

Source: https://habr.com/ru/post/1751867/


All Articles