05-22-2026 04:49 AM - edited 05-22-2026 04:51 AM
Hello!
I need to execute a test VI from CLI in order to automatize unit tests dedicated to someone else's open code program (execution from environment, not .exe runtime). This program calls project-dependant functions, like "palette/File IO/File constants/application directory"
It seems that because of these functions, I cannot simply execute my test VI by typing "LabVIEWCLI -OperationName -RunVI -VIpath <path of the test vi>" since it calls the program to test outside of its owned project. consequently, my test VI returns NOKs because of the presence of these functions mentionned above.
Can someone help me? 🙂 thanks
05-22-2026 12:52 PM
Hi Pierre,
It seems LabVIEW CLI does not support running a VI from a specific project.
What you can do instead is create a "generic runner" VI that can dynamically open the project, application and VI references and run the VI in the correct context.
Runner VI:
CLI Command (replace each <...> tag with its value, enclose in double quotes if it contains spaces):
LabVIEWCLI -LabVIEWPath <LabVIEWPath> -PortNumber <PortNumber> -OperationName RunVI -VIPath <RunnerVIPath> <ProjectPath> <TargetName> <DynamicVIPath> <Arg0> <Arg1> <Arg2> ...
Example VI to be run:
Result in "Log.txt":
Application Directory: C:\...\ProjectFolder
Arguments:
arg0
arg1
arg2
Regards,
Raphaël.