Continuous Integration

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand in docker container - unable to instantiate Engine class

Solved!
Go to solution

Hello,

 

I am doing some tests in order to run TestStand sequence in docker container.

 

Stript to install and activte application works, i also register teststand components:

 

FROM mcr.microsoft.com/dotnet/framework/sdk:4.8
ARG SERIALNUMBER

SHELL ["cmd", "/S", "/C"]


ADD https://download.ni.com/support/nipkg/products/ni-package-manager/installers/NIPackageManager22.5.0.exe .

RUN NIPackageManager22.5.0.exe --passive --accept-eulas --prevent-reboot &&\
 del NIPackageManager22.5.0.exe & exit 0

RUN setx /M PATH "%PATH%;/Program Files/National Instruments/NI Package Manager"

RUN nipkg.exe feed-add --name=ni-teststand-2019-2019-released https://download.ni.com/support/nipkg/products/ni-t/ni-teststand-2019/19.0/released &&\
    nipkg.exe update
   
RUN nipkg.exe install --yes --accept-eulas ni-teststand-2019  & exit 0   
RUN nipkg.exe install --yes --accept-eulas ni-teststand-2019-tools  & exit 0


RUN setx /M PATH "%PATH%;/Program Files/National Instruments/TestStand 2019/Bin"
RUN setx /M PATH "%PATH%;/Program Files (x86)/National Instruments/Shared/License Manager/Bin"

RUN regsvr32.exe /s "C:\Program Files\National Instruments\TestStand 2019\Bin\teapi.dll"

RUN nilmUtil.exe -s -activate "TestStand_DebugDeploy_Pkg" -version "19.0000" -serialnumber "%SERIALNUMBER%" -firstname "CI Pipeline" -lastname "CI Pileline" -organizationname "CI Pipeline" 
    
RUN more "./ProgramData/National Instruments/License Manager/Licenses/TestStand_DebugDeploy_Pkg_190000.lc"

 

After image builds I have problem instantiating Teststand Engine class to start doing somework:

pawhan11_0-1679135427479.png

It hangs forever without any indication.

Does anyone have an idea what else must be done to correctly instantiate Engine class?

On my host PC this works without issues.

 

0 Kudos
Message 1 of 7
(1,992 Views)
Solution
Accepted by topic author pawhan11

I have never tried using TestStand from PowerShell and in Docker. If TestStand displayed a prompt, would you see it? Can you get a process debug trace of the operation you are doing in any way, that might give you more information?

 

You might want to check to see if the TestStand AutoMgr (TSAutoMgr.exe) process can be successfully launched. It will launch and close with TestStand, but if it fails to launch, the TestStand engine will not complete initialization. Here is an example KB where some customers would see this type of issue: Error -17501 Unable to Load Test Environment CVI Adapter When Opening TestStand

 

 

Scott Richardson
0 Kudos
Message 2 of 7
(1,946 Views)

Hi,

 

could you elaborate your use case for running TestStand in a container?

Cheers

Oli

0 Kudos
Message 3 of 7
(1,939 Views)

@Oli_Wachno wrote:

Hi,

 

could you elaborate your use case for running TestStand in a container?

Cheers

Oli


Repeatable awesomeness?

 

Although more seriously, I'd have guessed lots of TestStand usage involves significant hardware, which could be another problem for Docker containers...

 

Then again, perhaps the OP has already arranged for this to be via some suitable interface (web service, etc) that doesn't immediately fall over when used inside a container.


GCentral
Message 4 of 7
(1,934 Views)

@cbutcher wrote:

@Oli_Wachno wrote:

Hi,

 

could you elaborate your use case for running TestStand in a container?

Cheers

Oli


Repeatable awesomeness?

 

Although more seriously, I'd have guessed lots of TestStand usage involves significant hardware, which could be another problem for Docker containers...

 

Then again, perhaps the OP has already arranged for this to be via some suitable interface (web service, etc) that doesn't immediately fall over when used inside a container.


Yeah, I was intrested about that other thing apart from awesomness :😅

Message 5 of 7
(1,929 Views)

It turned out that TSAutoMgr.exe was the issue, after it is started all seems to work as expected.

 

About usecase - we wanted to include teststand into our CI pipeline to prevent from commiting broken sequence files.

This can be achieved by running sequence analyzer as part of build process using teststand API.

 

Running standard sequences in docker should also work. In our case all hardware that TS requires to run test cases is separated from teststand by DDS message broker. Interaction with user is problematic - now it requires host pc to display form. 

0 Kudos
Message 6 of 7
(1,882 Views)

Thanks for the update and use case summary, glad you got it working.

Scott Richardson
0 Kudos
Message 7 of 7
(1,871 Views)