ATF Record Validation Test Failed - why?

Nia McCash
Mega Sage
Mega Sage

I've been experimenting with the Automated Test Framework and I'm finding lots of quirks.   Here's one that I hope someone in the community can help with...

I have a Record Validation test step which is just checking for the 'Active' flag on a record.   The only two options are true or false, (the test step config doesn't give any other options) but it doesn't matter which I select, the test always fails. Why?

Here is the test step setup:

ATF-record validation.jpg

I've confirmed that a matching record was found in both cases but both tests fail:

ATF-record validation fail1.jpg

ATF-record validation fail2.jpg

1 ACCEPTED SOLUTION

Nia McCash
Mega Sage
Mega Sage

So, in my case, this turns out to be a stupid error on my part.   The user (with no roles) that I was impersonating didn't have permissions to query/read the active field.  



Lesson learned: when impersonating, remember to keep in mind the permissions that to which the impersonated user has access!


View solution in original post

13 REPLIES 13

Hi Nia,


I ran into the exact same issue with similar code.   The wait was working, but my tests were failing and getting stuck in pending.   It appears the script requires an output to work properly.   I created a true/false output variable called "u_waited" and added a line to set it to true:



(function executeStep(inputs, outputs, stepResult) {


gs.sleep(inputs.u_sleeptime * 1000);


stepResult.setOutputMessage(gs.getMessage("Wait complete"));


outputs.u_waited = true;


stepResult.setSuccess();


}(inputs, outputs, stepResult));


I got it to work without an output variable.   All I was missing initially was this line: stepResult.setSuccess();  



But, while that fixed my custom step configuration, it did not resolve my original issue, for which I'm still waiting on a response from HI support.


Right after posting my previous reply, I also got it to work without an output variable...but with my original code.   I can't even replicate the issue I was having previously.


Nia McCash
Mega Sage
Mega Sage

So, in my case, this turns out to be a stupid error on my part.   The user (with no roles) that I was impersonating didn't have permissions to query/read the active field.  



Lesson learned: when impersonating, remember to keep in mind the permissions that to which the impersonated user has access!


When setting up your test step configuration, did you need to add anything special to the HTML section of the form?