Validate app functionality
Summarize
Summary of Validate app functionality
This guidance outlines the essential testing processes to validate that a ServiceNow application functions as intended throughout its development lifecycle. It emphasizes the importance of unit testing, system testing, automated testing, and user acceptance testing to ensure quality and compliance with business requirements.
Show less
Unit testing
Unit testing verifies that features specified in a story meet the requirements before the story is closed. Developers must test not only the individual story but also related stories sharing components. It is recommended to assign the story to process owners or stakeholders for validation. ServiceNow’s Automated Test Framework (ATF) can be used to automate some unit tests, especially those involving Script Includes and Business Rules.
System testing
Performed by the QA/testing team once development is complete, system testing evaluates the full system, including interactions and integrations within scope. Developers collaborate with QA and process owners to ensure comprehensive test coverage and are responsible for fixing any issues identified during this phase.
Automated Test Framework (ATF)
ATF is a key tool for automating functional system tests in ServiceNow, helping reduce testing time and costs while enabling repeatable, UI-independent testing. Best practices include:
- Using parameterized tests to avoid duplication
- Following a standardized test naming convention (e.g., <app initial>: <functionality>)
- Describing each test’s use case clearly
- Developing tests on a Development instance and promoting them to Test instances while preserving tests during instance clones
- Creating self-contained tests and adding server-side or REST test steps where needed
- Starting tests with an Impersonate step and being mindful of browser throttling
- Utilizing Test Logs and Test Transactions for troubleshooting
Test suites should also follow naming conventions, have clear descriptions, and be organized by feature areas to facilitate management.
User acceptance testing (UAT)
UAT is conducted by users, customers, or authorized stakeholders to confirm the application meets business requirements and is ready for delivery. Developers are responsible for addressing any issues uncovered during system testing prior to UAT completion.
As the application is built, validate that it works as expected.
Unit testing
Unit/Story testing ensures requirements specified in a story are validated before closing the story. A Story/Unit is a smallest testable portion of system or application that can be configured and executed.
When the configuration of the story is complete, developers need to unit test the features not only in the context of that particular story, but also other related stories that share components with the current story.
As a good practice, developers need to assign the story to process owner or designated stakeholder to validate the story configuration meets expected outcomes before closing the story.
ServiceNow’s Automated Test Framework (ATF) is primarily meant for automating functional testing of applications but in few cases can be used to automate unit testing of configurations that involve Script Includes and Business Rules.
System testing
System testing is performed on a complete system when development is completed. Test the overall interaction of components and integrations with other applications within scope. System testing is performed by the QA/Testing team, but developers need to collaborate with the QA team and process owners to ensure test cases provide comprehensive coverage. Developers will be responsible for remediation of issues found during System Testing.
Automated Test Framework
Automated Test Framework (ATF) should be leveraged for automating functional system testing of ServiceNow applications to reduce testing time and costs and make testing repeatable and UI independent. When creating test cases, follow these guidelines.
When creating tests:
- Use parameterized testing to avoid duplicate test cases.
- Follow a Test naming standard.
- <app initial>: <functionality that is being tested>
- CSM: Resolve case
- Describe each test’s use case in its description. For example: Sample that tests use case.
- Develop tests on a Development instance and promote/run the test on a Test instance.
- Clones wipe out tests. Use one of these options to preserve tests:
- Bundle tests in a scoped app and upload the app to GIT.
- Save tests before the clone.
- Promote tests to prod instance, but DO NOT EXECUTE THE TESTS IN PROD.
- Create self-contained tests.
- Create new server-side or REST test steps any test steps are missing. For example: Email body verification.
- Use server-side test step whenever possible and when screenshots are not important.
- Start with the Impersonatestep.
- Be aware of browser throttling.
- Use the Test Logs and Test Transactions to troubleshoot test errors.
When creating test suites:
- Follow a test suite naming standard. For example: ITSM INT: Use cases.
- Describe the suite.
- Test suite description: "This is a sample test suite to test plugin/application".
- Provide any additional information possible in the description.
- Organize test suites by feature areas.
User acceptance testing
User Acceptance Testing (UAT) is a test conducted to evaluate the application’s compliance with the business requirements and assess whether the application is acceptable for delivery. Users, customers, or other authorized stakeholders perform acceptance testing. Developers will be responsible for remediation of issues found during System Testing.