Unit Testing problem

110 views
Skip to first unread message

levan_tak...@unitedsolutions.biz

unread,
Jul 7, 2017, 1:40:52 PM7/7/17
to Jenkins Users
Dear All,

I am running c# Unit Tests through Windows Jenkins and while executing tests console output window shows me same error for all the tests:

Error Message:
   Test method Levan_Test threw exception: 
System.ComponentModel.Win32Exception: Access is denied
Stack Trace:
    at System.Windows.Forms.SendKeys.SendInput(Byte[] oldKeyboardState, Queue previousEvents)
   at System.Windows.Forms.SendKeys.Send(String keys, Control control, Boolean wait)
   at System.Windows.Forms.SendKeys.SendWait(String keys)

cs:line 134


It looks like there is some problem with permissions or power shell command execution.

Any tips, advise and recommendations will be much appreciated!!

Thanks in advance,

Levan

Slide

unread,
Jul 7, 2017, 2:15:00 PM7/7/17
to Jenkins Users
If you are running Jenkins as a service, it can't do stuff that interacts with the desktop, e.g., Windows forms applications. You would want to have a build agent running on the desktop using JNLP as a normal user that runs these tests.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/674a247d-2bad-4444-bf95-afcbf6da4b77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

levan_tak...@unitedsolutions.biz

unread,
Jul 7, 2017, 5:27:30 PM7/7/17
to Jenkins Users
Thanks a lot! Could you please elaborate what do you mean under: "You would want to have a build agent running on the desktop using JNLP as a normal user that runs these tests."

I am new to Jenkins..

Slide

unread,
Jul 7, 2017, 5:33:51 PM7/7/17
to Jenkins Users

levan_tak...@unitedsolutions.biz

unread,
Jul 11, 2017, 11:10:57 AM7/11/17
to Jenkins Users
Thanks a lot!! I will look into it. I just want to make it clear I am running Unit Test coded in c#. I am just building and executing test via Jenkins using MSbuild and running vstest.console.exe via windows batch command. 
Reply all
Reply to author
Forward
0 new messages