Is it possible to wrap around Selenium 2.0 WebDriver Test Cases with anything other than NUnit for C# code? Or perhaps NUnit has a nice application to do this with? If not, how can I wrap around the code. I would like to create a web interface that displays the results of our test cases and logs information about successes/failures of each test case. How can this be done?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Yes. Extending the user246’s answer, Selenium is just a library that allows you to manipulate with web pages. Unit Test Framework wraps your tests and helps you to run the tests and produce the test execution report with number of passed/failed tests. You can also use MS Test, NUnit, xUnit or any other test framework.
Yes, NUnit is good for this as any other unit test framework. Any popular test framework produces the test execution results as the XML file. From this XML file you could generate any HTML/PDF report you want.
There are several open source and/or free tools that can schedule tests and produce online report. Please consider Jenkins or TeamCity or any other Continious Integration server. But, it will be much easier if you start from generating offline HTML report and just send it by email.
Selenium is just an API. You should be able to use it with any C# test framework.
Typically people hook a continuous integration server up with selenium to provide a web interface. You can use Jenkins, it's open source, and can allow you to execute tests remotely, track success/failures, etc.
Also try MbUnit/Gallio instead of nUnit, it provides a much more robust package to perform typical testing tasks, and includes better reporting and metrics.