11-21-2025 04:55 AM
Hello,
We are currently working on executing our tests using the TestStand API. I’ve attached an extract of our .NET code for reference, and we have a couple of questions.
Our overall objective is to manage and run tests through an Azure DevOps Pipeline and Test Plans.
Does our use case align with the intended usage of the TestStand API?
We would like to generate reports (XML and HTML) in a custom directory so they can be published within the pipeline. Using Report report = execution.Report; does not appear to achieve this. Is there a recommended approach to specify a custom report output location?
Thank you in advance for your support.
Best regards,
Thierry
12-16-2025 02:58 AM - edited 12-16-2025 02:59 AM
Hello,
I have already attempted to use the ReportOptions as specified in the referenced NI documentation, as shown below.
// Reports Options customization
Sequence newReportOptions = sequenceFile.CreateCallbackOverrideSequence(DefaultModelCallbacks.DefModCback_ReportOptions, true);
newReportOptions.AsPropertyObject().SetValString("Parameters.ReportOptions.Directory", 0, @"C:\Workspace\Reports");
newReportOptions.AsPropertyObject().SetValString("Parameters.ReportOptions.DirectoryType", 0, "SpecificDirectory");
newReportOptions.AsPropertyObject().SetValString("Parameters.ReportOptions.Format", 0, "ATML");
int executionTypeMask = ExecutionTypeMask ...
Execution execution = engine.NewExecution(
sequenceFile,
sequenceName,
seqModelFile,
false,
executionTypeMask);
Unfortunately, the reports are still not being generated in the intended directory (C:\Workspace\Reports)
Best Regards,
Thierry E.
12-16-2025 06:03 AM
The NI examples are slightly different IMHO:
they modify the content of the Parameters from within the call back sequence.
What your code is doing is more or less setting the default value for the parameters. I by the time the callback is executed, those values have already been overwritten with the standard values.
To prove this: save your dynamically created sequence and check in the SequenceEditor using a breakpoint.