Execute Selenium C# scripts from command line

1,303 views
Skip to first unread message

Selenium Automation user

unread,
Jan 11, 2016, 9:34:22 PM1/11/16
to Selenium Users
I have created my automation framework in Visual Studio 2015 in C# , now I want to automate execution of subset of my all test scripts , how can I achieve this?
I have created my test scripts as unit test in C# , tried using Nunit but that it has a different architecture and all test methods need to be in a file, I have different files for a test method that is basically a test scenario, I have some common libaries of user defined functions that all 
test scripts are referring.
Please suggest a way to achieve auto execution of selected test scripts, either through command line that can be used to create a batch file of selected scripts  or any way.
Thanks for your help.

Thanks

Kancharla Prasad

unread,
Jan 11, 2016, 11:57:30 PM1/11/16
to Selenium Users
you can write a shell/perl (any script) to execute your suite in Nunit console (IDE), so that u will get result as xml (can convert this xml to html using nunit orange dll)

Shashi

unread,
Jan 12, 2016, 11:17:54 AM1/12/16
to Selenium Users
Since you are using Visual Studio and C#, see if the following meets your needs:


mstest also has options to publish results to a file or a TFS database if you need that functionality:


NOTE:  The above will run tests on your local computer (i.e. the computer from where you invoke the mstest command) - I don't think it supports launching tests on one server and having them run on a different server.  If you want the latter, you will probably need to set them up in Microsoft Test Manager in conjunction with TFS (other non-MS options may also be available).

Hope that helps,
Shashi

Kaleem Uddin Mohammed Abdul

unread,
Jan 12, 2016, 4:41:51 PM1/12/16
to Selenium Users
+1 For Shashi reply!
Reply all
Reply to author
Forward
0 new messages