Run selenium with C# and NUNIT in JENKINS

575 views
Skip to first unread message

Rafael C.

unread,
Apr 20, 2015, 3:22:06 PM4/20/15
to seleniu...@googlegroups.com
Hello,

I have scripts done in visual studio using selenium + c # + nunit, but I need to configure them to run on jenkins.

I searched google but have not found how I can do this.

Can someone help me?

Cheers,
Rafael

Serguei Kouzmine

unread,
Apr 29, 2015, 8:32:17 PM4/29/15
to seleniu...@googlegroups.com
Hello Rafael

Can you please be a little bit more specific where do you get stuck ?
You can execute nunit tests by calling nunit-console.exe feeding it the path to the dll you compiled:



nunit-console.exe Sample\bin\Debug\Sample.dll

 

...
ProcessModel: Default    DomainUsage: Single
Execution Runtime: net-3.5
.F
Tests run: 1, Errors: 1, Failures: 0, Inconclusive: 0, Time: 0.874980639748968 seconds
  Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
(sorry used old code, but you hopefully get the successfully passing tests


report will be found in the workspace directory:
TestResult.xml
 so at a bare minimum you can run it in batch or in a powershell build step.
There is nunit / junit result processing Jenkins plugins to  integrate reports into  the build status  / statistics.
https://wiki.jenkins-ci.org/display/JENKINS/JUnit+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/NUnit+Plugin

Thanks

Serguei Kouzmine

Madan Singh

unread,
Apr 29, 2015, 11:34:09 PM4/29/15
to seleniu...@googlegroups.com
Hi Rafael,

You  can set as in Jenkins 
Build
Execute Windows batch command
 "C:\Program Files (x86)\NUnit 2.6.3\bin\nunit-console.exe" "D:\QA-OFFICE\CPP-AUTO-TFS\TestLogin\TestLogin\bin\Debug\TestLogin.dll" /include:Test.LoginTest1

here include represent the Category as I used in my Test case in VS 


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/71557fd3-cfea-414a-8475-24683550a8c7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
M P Singh
9971360313
Reply all
Reply to author
Forward
0 new messages