03-18-2023 05:33 AM
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:
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.
Solved! Go to Solution.
03-19-2023 07:14 PM
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.
03-20-2023 12:52 AM
Hi,
could you elaborate your use case for running TestStand in a container?
Cheers
Oli
03-20-2023 01:02 AM
@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.
03-20-2023 01:09 AM
@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 :😅
03-21-2023 07:05 AM
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.
03-21-2023 12:41 PM
Thanks for the update and use case summary, glad you got it working.