Unit Testing problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Unit Testing problem

levan_taktakishvili
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

--
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unit Testing problem

slide
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.

On Fri, Jul 7, 2017 at 10:40 AM <[hidden email]> wrote:
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

--
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 [hidden email].
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVdFJxE4Au_YvBjQq0Qj9W_O97xi54iS9%2BN8gvsQuHEO%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unit Testing problem

levan_taktakishvili
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..

On Friday, July 7, 2017 at 2:15:00 PM UTC-4, slide wrote:
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.

On Fri, Jul 7, 2017 at 10:40 AM <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="jfpIIfO-BAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">levan_tak...@unitedsolutions.biz> wrote:
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

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="jfpIIfO-BAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/674a247d-2bad-4444-bf95-afcbf6da4b77%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/674a247d-2bad-4444-bf95-afcbf6da4b77%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/674a247d-2bad-4444-bf95-afcbf6da4b77%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/674a247d-2bad-4444-bf95-afcbf6da4b77%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1b4f3d7e-699b-4d79-92ef-92b6997d92c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unit Testing problem

slide

On Fri, Jul 7, 2017 at 2:27 PM <[hidden email]> wrote:
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..

On Friday, July 7, 2017 at 2:15:00 PM UTC-4, slide wrote:
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.

On Fri, Jul 7, 2017 at 10:40 AM <[hidden email]> wrote:
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

--
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 [hidden email].

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1b4f3d7e-699b-4d79-92ef-92b6997d92c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVebC9TXVHNwEUvTdKDkrGCHCF3pScLW9POHw3BRYGLPxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unit Testing problem

levan_taktakishvili
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. 

On Friday, July 7, 2017 at 5:33:51 PM UTC-4, slide wrote:
I would start on this wiki page <a href="https://wiki.jenkins.io/display/JENKINS/Distributed+builds#Distributedbuilds-LaunchslaveagentviaJavaWebStart" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FDistributed%2Bbuilds%23Distributedbuilds-LaunchslaveagentviaJavaWebStart\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEN9-uvmfD4D8x_Q4OtlQzu2pKPjQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FDistributed%2Bbuilds%23Distributedbuilds-LaunchslaveagentviaJavaWebStart\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEN9-uvmfD4D8x_Q4OtlQzu2pKPjQ&#39;;return true;">https://wiki.jenkins.io/display/JENKINS/Distributed+builds#Distributedbuilds-LaunchslaveagentviaJavaWebStart. 

On Fri, Jul 7, 2017 at 2:27 PM <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="GRyMEM3JBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">levan_tak...@unitedsolutions.biz> wrote:
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..

On Friday, July 7, 2017 at 2:15:00 PM UTC-4, slide wrote:
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.

On Fri, Jul 7, 2017 at 10:40 AM <levan_tak...@unitedsolutions.biz> wrote:
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

--
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 <a href="https://groups.google.com/d/msgid/jenkinsci-users/674a247d-2bad-4444-bf95-afcbf6da4b77%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/674a247d-2bad-4444-bf95-afcbf6da4b77%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/674a247d-2bad-4444-bf95-afcbf6da4b77%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/674a247d-2bad-4444-bf95-afcbf6da4b77%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="GRyMEM3JBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/1b4f3d7e-699b-4d79-92ef-92b6997d92c6%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1b4f3d7e-699b-4d79-92ef-92b6997d92c6%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/1b4f3d7e-699b-4d79-92ef-92b6997d92c6%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/1b4f3d7e-699b-4d79-92ef-92b6997d92c6%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7617010b-3cd2-42be-bd9e-641dde441f44%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...