NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

setting a report path manually using <clientfiledir>

Solved!
Go to solution

Hi all,

I am pretty new to teststand so please forgive me if this is an easy question.

 

BACKGROUND

I am running a sequence (TestGroup) that contains multiple sequences (tests) that are run as a new execution.  This is to allows me to produce an individual report for each test (the top level sequence produces a summary report only).

 

ISSUE

I want each of the reports to be stored in a single folder. I have setup the report options to calculate the report path using the following expression "<ClientFileDir>\\Reports\\<ClientFileName>\\SummaryReport[<FileTime>][<FileDate>].<FileExtension>"

 

This works fine for the top level but as this is also applied to the sub-sequences the path is recalculated and is different from that of the top level.

 

CURRENT SOLUTION

I am currently trying to pass the report path as a parameter to the test sequences but am struggling to find the value of the <ClientFileDir> macro (of the top level sequence) to build the report path.  Can anyone tell me how i get this?

Another solution is for me to take the current report path and strip the file name from this.  Is this a better solution?

 

Any help would be great.  Thanks,

G

0 Kudos
Message 1 of 4
(3,713 Views)

Hi G,

 

I believe that you're looking for the either the DetermineReportFilePathNameExpr or the DetermineReportFilePathName functions in ModelSupport2.dll These are the functions that the Process Model uses to determine the filename and path for test reports.

 

It's sounds like you're generating separate reports in the same execution, and it's not clear how you're doing that - are you using the Batch process model? If you're custom creating your reports from within your main sequence, it isn't clear how that's occurring.

 

Also, are your 'Tests' each in their own separate sequence file?

 

-Jack

0 Kudos
Message 2 of 4
(3,701 Views)
Solution
Accepted by topic author Dr Graeme Milligan

Hi Jack,

I am using a sequence to group together tests (seq) and an currently running each of my tests as a New execution.  This means i can apply a different model to each test (this is required to support old style tests previous developed by my client) and produce an individual test report for each test.  I then wipe out the reults list when the report has been written and replace this with a link to the report for the test (i am hoping this reduces the risk of running out of memory on long test runs).

 

Each of my 'tests' is indeed a sequence in its own right.

 

I was hoping to use something similar to the macros used in the reports options window to pass the report path to each of my tests (or the model for the test) but have not been able to find these values anywhere.  In the end I now take the string generated for the top level 'group' sequence and do some string formatting then pass this as a parameter to the tests (another headache which took some solving).

 

I am not really a fan of this and think it should be possibel to setup different report options for each model, which i have had to do manually by hardcoding stuff like .xsl path names etc.

 

can someone tellme if this seems like the right approach?

 

G

0 Kudos
Message 3 of 4
(3,697 Views)

G,

 

The approach you're using to get reports to go where you want them to is one of several ways this could be done. If it's working, then it's one of the right approaches. It's hard to tell if this is the best approach based on your post. If you're looking for suggestions on optimizing and/or future-proofing your implementation, that would require more detail on exactly how your 'New Executions' are started, what process model they use, what the Test sequences you are calling are structured and contain, in terms of Callbacks into the process models, and and any other in-process steps that you perform that might have an effect on how this system works.

 

In summary, what you've described is a pretty complex implementation of TestStand that supplements and/or substitutes the existing Process Model approaches with your Main Sequence. Since you've gotten that to work, you're not so inexperienced with TestStand as you think you are!

 

-Jack

0 Kudos
Message 4 of 4
(3,662 Views)