04-12-2024 01:46 PM
I have a Pass/Fail test step in my sequence. In the Post Expression of the step I want to assign a FileGlobal boolean variable with the step result.
In the Post Expression I have the following statement:
In the step passes, the post expression does not set the FileGlobals.TestPassed boolean = True. Why is that not the case? How do I resolve this issue? Thanks!
04-15-2024 12:43 AM
What does the data source expression for this test look like?
04-15-2024 10:45 AM
Hi Oli, the data expression looks like this:
(#NoValidation(Locals.PartNumber) == (Locals.ScannedPartNumber))
I guess I could use in the Post Expression the same expression to set the test passed boolean. I figured I could use Step.Result.PassFail since the statement FileGlobals.TestPassed = Step.Result.PassFail is in the Post Expression of the step. However, the test passed variable never changes. Very confused by this.
04-15-2024 03:33 PM - edited 04-15-2024 03:34 PM
Your test is a "None Adapter" step; put this in your post expression, and you should get what you want:
#NoValidation,
FileGlobals.TestPassed = Step.Result.PassFail = (Locals.PartNumber == Locals.ScannedPartNumber)
04-16-2024 02:15 PM
Its a "None" adapter step but it is a "None" adapter Pass/Fail test step. Since my "data source" experssion statement is
(Locals.PartNumber == Locals.ScannedPartNumber)
I'd assume the step would then update the Step.Result.PassFail boolean = True. However, when I put in the post expression
FileGlobals.TestPassed = Step.Result.PassFail
TestPassed always stays false.
04-16-2024 06:25 PM
Change your Data Source to
Step.Result.PassFail = (Locals.PartNumber == Locals.ScannedPartNumber)