Is your Jenkins running as a service? If it has to open Excel and is
running as a service, this can be an issue. You need to give the service
the ability to interact with the desktop. I believe this is in the service
settings, but you can Google and find information if it is not right there.

On Sun, Jul 19, 2020, 06:45 TC <[email protected]> wrote:

> I am new to Jenkins. I installed it today on a Windows 10 computer to
> automatically build (using the MSBuild plugin) and run unit tests (using
> NUnit Console as a batch command) on my .NET solution. Almost everything
> works perfectly, but I have been unable to solve one frustrating problem,
> despite working on it for hours:
>
> One unit test project fails, but only when run from Jenkins. I can run the
> same unit tests from anywhere, logged-in as anybody, and they pass.
>
> In an attempt to debug the problem, I created a new account called
> "Jenkins" and configured the Jenkins service to run under that account. I
> have configured my Jenkins project to execute "whoami" as a Windows batch
> command, and verified that Jenkins is running as the "Jenkins" user. I have
> verified that the "Jenkins" user can run the unit tests without error. I
> have logged-in as myself, used "runas" to impersonate the "Jenkins" user,
> and verified that the unit tests pass under those conditions also. Yet
> somehow when Jenkins runs the same tests as the same user, the tests fail.
>
> So my question is: What does Jenkins do differently when it executes a
> Windows batch command that could explain the failure? Because the unit
> tests run successfully outside of Jenkins, and only fail inside Jenkins, I
> think I can crack this problem if I just know more about the runtime
> environment Jenkins creates.
>
> About the error itself:The failing tests all automate Excel. The error
> reported by Excel is "Microsoft Excel cannot open or save any more
> documents because there is not enough available memory or disk space".
> Posts on the internet generally say this message indicates a DCOM security
> problem (and has nothing to do with memory or disk space). Giving the user
> sufficient privileges to launch, activate, and access Microsoft Excel
> applications should solve the problem. I've done that, giving the "Jenkins"
> user full permission on Excel applications, yet the error persists.
>
> All advice is appreciated.
>
>
> -TC
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/db1129ea-84dd-41ea-8349-8a887fa85853o%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/db1129ea-84dd-41ea-8349-8a887fa85853o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVf82zQL_hqrA5O14hkSo8pcOkCtXRY9nsuDYAV1WRJBVw%40mail.gmail.com.

Reply via email to