04-24-2017 02:13 AM
Hi,
I'm trying to add a customized database schema to teststand, and log test result to 2 seperated tables, one for general test info, one for test result.
Question is that I don't know how to write express to add specific step result to tables.
The default schema records every step and add test name, value, unit to a row record seperately, while i'd like to add a test result with current loop variable to a single row. For example
default schema
id stepname
0 for {i=2}
1 measure vcc
2 3.5
3 V(Units)
What I want is like below:
id loop stepname value unit
0 2 measure 3.5 V
I already setup a database and schema in SQL Server, but i don't know what to put in 'Value to Log' in result options dialog. And where dose this Logging parameters come from. I don't see this parameters in my sequence file. and how does this Logging parameter get test parameters from my sequence file
Thanks in advance
04-25-2017 04:53 PM
Take a look at the TestStand help topic "Customizing Database Logging Expressions" for starters.
The key issue to understand is that the database logger treats TestStand results as a tree where the top most MainSequence step result is the a "UUT Result", then the logger processes the top most Main Sequence step result as a "Step Result", and the logger recurses into the step results from the sequence call. As it processes each step result, the logger recurses on the subproperties of the step result as a "Property Result".
As the logger operates on a UUT, step, or property result, the logger updates the subproperties under the Logging property to refer to the contents of the corresponding result.
For each result that the logger processes, the logger evaluates the statements that match the corresponding result type, evaluates the Types to Log, Precondition and Expected Properties settings to decide whether the statement must be processed, and if the statement is processed, the logger evaluates the Precondition and Expected Properties settings to decide whether the column must be processed. The logger evaluates the Value To Log setting to determine what value to assign to the column in the table.