- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2023 11:37 PM
How do I use ATF to check if all the records are imported in a table through import sets
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2023 12:34 AM
Hello Siddhartha,
To write ATF (Automated Test Framework) test steps to check if records are imported in ServiceNow, you can follow these general guidelines.
Here's a step-by-step guide:
Access ServiceNow ATF:
- Log in to your ServiceNow instance.
- Navigate to the Automated Test Framework by typing "Automated Test Framework" in the application navigator.
Create a New Test:
- Click on "Create New Test" to start creating a new test case.
Define the Test Case:
- Give your test case a meaningful name that describes its purpose, e.g., "Check Records Import."
- Provide a description that explains the purpose and scope of the test.
Set Up the Test Environment:
- You might need to set up a specific test environment for your import test. This may include creating test data or ensuring that your ServiceNow instance is in a specific state before the test.
Add Test Steps:
- Add individual test steps to verify the records' import. Here's a sample set of test steps:
a. Navigate to the Import Page:
- Use the "Navigate" step to go to the page where you perform the import. Provide the URL or UI action name.
b. Perform the Import:
- Depending on how imports are done in your ServiceNow instance (e.g., using import sets, data sources, or other methods), create a test step that simulates the import process. This might involve filling out forms, uploading files, or invoking scripts.
c. Wait for Import to Complete:
- If the import process takes time, use a "Wait" step to pause the test execution until the import is expected to complete.
d. Verify Imported Records:
- Use the "Verify" step to check if the imported records are visible in the relevant list or table. You can verify this by searching for the imported records using specific criteria (e.g., a unique identifier).
e. Assert the Result:
- Use an "Assert" step to ensure that the expected number of records has been imported successfully. You can also check specific attributes of the imported records to verify their accuracy.
Execute the Test:
- Execute the test case to verify that the records are imported correctly. Make sure to provide any necessary input parameters or test data.
Review Test Results:
- After the test execution, review the results to see if the test passed or failed. If it failed, investigate the issue and make any necessary corrections to your import process or test case.
Cleanup (if necessary):
- Depending on your test case's impact, you may need to clean up any test data or changes made during the test execution.
Save and Reuse:
- Save your test case so that you can reuse it for future imports or as part of regression testing.
Schedule Automation (if needed):
- If this import check needs to be part of a routine testing process, consider scheduling it to run automatically at specific intervals.
Remember that the specific steps and configurations may vary based on your ServiceNow setup, the type of records you're importing, and your organization's testing requirements. Adapt the above steps to match your particular use case and ServiceNow instance configuration.
Please mark helpful if it resolves your issue.
Sindhu K M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2023 12:34 AM
Hello Siddhartha,
To write ATF (Automated Test Framework) test steps to check if records are imported in ServiceNow, you can follow these general guidelines.
Here's a step-by-step guide:
Access ServiceNow ATF:
- Log in to your ServiceNow instance.
- Navigate to the Automated Test Framework by typing "Automated Test Framework" in the application navigator.
Create a New Test:
- Click on "Create New Test" to start creating a new test case.
Define the Test Case:
- Give your test case a meaningful name that describes its purpose, e.g., "Check Records Import."
- Provide a description that explains the purpose and scope of the test.
Set Up the Test Environment:
- You might need to set up a specific test environment for your import test. This may include creating test data or ensuring that your ServiceNow instance is in a specific state before the test.
Add Test Steps:
- Add individual test steps to verify the records' import. Here's a sample set of test steps:
a. Navigate to the Import Page:
- Use the "Navigate" step to go to the page where you perform the import. Provide the URL or UI action name.
b. Perform the Import:
- Depending on how imports are done in your ServiceNow instance (e.g., using import sets, data sources, or other methods), create a test step that simulates the import process. This might involve filling out forms, uploading files, or invoking scripts.
c. Wait for Import to Complete:
- If the import process takes time, use a "Wait" step to pause the test execution until the import is expected to complete.
d. Verify Imported Records:
- Use the "Verify" step to check if the imported records are visible in the relevant list or table. You can verify this by searching for the imported records using specific criteria (e.g., a unique identifier).
e. Assert the Result:
- Use an "Assert" step to ensure that the expected number of records has been imported successfully. You can also check specific attributes of the imported records to verify their accuracy.
Execute the Test:
- Execute the test case to verify that the records are imported correctly. Make sure to provide any necessary input parameters or test data.
Review Test Results:
- After the test execution, review the results to see if the test passed or failed. If it failed, investigate the issue and make any necessary corrections to your import process or test case.
Cleanup (if necessary):
- Depending on your test case's impact, you may need to clean up any test data or changes made during the test execution.
Save and Reuse:
- Save your test case so that you can reuse it for future imports or as part of regression testing.
Schedule Automation (if needed):
- If this import check needs to be part of a routine testing process, consider scheduling it to run automatically at specific intervals.
Remember that the specific steps and configurations may vary based on your ServiceNow setup, the type of records you're importing, and your organization's testing requirements. Adapt the above steps to match your particular use case and ServiceNow instance configuration.
Please mark helpful if it resolves your issue.
Sindhu K M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2023 03:46 AM
OMG it's really helpful, you deserve to MVP of ServiceNow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2023 10:23 AM
Step 8 you have "Cleanup". However, won't any cleanup done during the test get rolled back once the test completes? This is an issue we're facing - sometimes data created by a test won't get rolled back. We'd like a way to clean up these records after a test finishes (or during the test run if that clean up won't get rolled back). So I'm wondering what you meant by "clean up" in these steps