开发者

Does selenium RC runs c# tests using java -jar option?

开发者 https://www.devze.com 2023-01-07 16:07 出处:网络
Is there any option available to run c#/.NET tests directly using selenium server like following option for html based tests?

Is there any option available to run c#/.NET tests directly using selenium server like following option for html based tests?

( java -jar selenium-server.jar C# based tests/suites)

-htmlSuite : Run a single HTML Selenese (Selenium Core) suite and then exit immediately, using the specified browser (e.g. "*firefox") on the specified URL (e.g. "http://www.google.com"). You need to specify the absolute path to the HTML test suite as well as the path to the HTML results file we'll generat开发者_开发问答e.

Thanks!


To run your C# tests you will need to have the Selenium server running with

java -jar selenium-server.jar

and then you will need to compile the tests and use a .NET testing framework like NUnit, MBUnit or MSTest.


Well, the C# tests aren't java, so I'd say no. Guess you'd have to create a c# class, or something to run the c# API for selenium, or use nUnit. Maybe I'm misunderstanding the question though?


Selenium-RC acts as a web server. It accepts commands (in "selenese") in two fashions - via a HTML file, or via HTTP requests. (It can also accept them on the command line if you start it with the -interactive flag).

The various client languages are APIs that wrap the HTTP protocol. If you are using C#, then you need to write a C# program (possibly using NUnit, or some other .NET-baesd unit testing tool).

If you want a single-command option that will launch the Selenium-RC server and run your tests, you'll need to get your testing tool to execute the java -jar selenium-server.jar command on startup, and then send a shutdown command to it at the end.

0

精彩评论

暂无评论...
验证码 换一张
取 消