- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 10:56 AM
My update record test step is failing to update the record but it is also not failing the test.
I have tried updating a record a couple different ways.
First, I used a Record Update test step and ran it by itself and updating an existing record. The test indicates that it runs successfully, however, when I go and check in the table, none of the fields I have chosen have changed.
Second, I used a Run Server Side Script and the following code in the step:
var gr = new GlideRecord('x_scoped_table');
gr.get("sys_id_of_record_from_scoped_table");
gs.info("Value of field_to_be_changed: ", gr.getValue(field_to_be_changed)) //This returns false (0)
gr.field_to_be_changed = true;
gr.update();
gs.info("Value of field_to_be_changed: ", gr.getValue(field_to_be_changed))//This return true (1)
The application log indicates that the record changes. But, again, the table indicates that no change has been made. Additionally, the test step does not fail.
The code is also not the issue. I have tested it in a scheduled job and the record field changed as expected.
I am running everything as admin so I should not have any access issues
Solved! Go to Solution.
- Labels:
-
Automated Test Framework

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 03:22 PM
Hi,
There is a feature of rollback in ATF which reverts all the changes made to a record through ATF. Please have a look from the below snipped from docs and a link.
Also,
Please find the below link for the records which are not rolled back.
Is the test cases failing? if not so I believe the records are being updated and the tests are being passed successfully and reverted back to keep the test instance clean.
Kindly mark my answer as Correct and Helpful based on the Impact.
Regards,
Alok

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 03:22 PM
Hi,
There is a feature of rollback in ATF which reverts all the changes made to a record through ATF. Please have a look from the below snipped from docs and a link.
Also,
Please find the below link for the records which are not rolled back.
Is the test cases failing? if not so I believe the records are being updated and the tests are being passed successfully and reverted back to keep the test instance clean.
Kindly mark my answer as Correct and Helpful based on the Impact.
Regards,
Alok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2020 02:07 PM
Thank you! This helped me solve my problem. I will include an additional note here that ATF does not rollback the creation of records. This is what initially confused me. I was able to see the creation of my test records but then was not able to see their updates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2020 02:20 PM
Thank you for the response! This helped me solve my problem. I will also note here that ATF does not rollback records that are created. This is what initially confused me. I could see that my records were being created but I could not see them being updated.