Automation Studio API

Hello,

You are correct that an ARSim instance is needed. RUC can spin this up for you.

I have used a separate “UnitTesting” configuration in Automation Studio for this and I first build a RUC package for this unit testing configuration, then i use RUC to start the ARSim instance and then it is possible to run the unit tests with HTTP requests. I used a powershell script to run the tests and parse the results so that I could return either a pass or fail value.

Automation Help: Using the Unit Test web service

Here are some commands, which might be helpful. (I have used these with GitHub actions). Replace the <> parts with relevant informations for your project.

  1. Create RUC Package for Unit Test configuration, force simulation
C:\BRAutomation\AS412\bin-en\BR.AS.Build.exe "<PathToProject>/Project.apj" -c <UnitTestConfigName> -buildRUCPackage -simulation
  1. Create a instruction list(PIL file) for PVITransfer (RUC)
Write-Output 'CreateARsimStructure "<PathTo>\RUCPackage.zip", "<Path to where you want to create the simulation>", "Start=1"' | Out-File <Path where you want to create the pil file>\CreateUniteTestArsim.pil -Encoding ASCII
  1. Create and start ArSim
Start-Process -FilePath 'C:\BRAutomation\PVI\V4.12\PVI\Tools\PVITransfer\PVITransfer.exe' -ArgumentList '-silent -<Path to PIL File here> -<Path to log file>'
1 Like