Validate app functionality
Summarize
Summary of Validate app functionality
Validating app functionality is essential to ensure that the application works as expected throughout its development lifecycle. This involves multiple testing phases: unit testing, system testing, automated functional testing, and user acceptance testing (UAT). Each phase has specific roles and best practices to confirm that the application meets business requirements and quality standards before release.
Show less
Unit testing
Unit testing focuses on validating individual stories or smallest testable portions of the application. Developers are responsible for testing features both within the context of the story and across related stories sharing components. Assigning the story to process owners or designated stakeholders for validation before closing is a recommended practice. ServiceNow’s Automated Test Framework (ATF) can assist in automating some unit tests involving Script Includes and Business Rules.
System testing
System testing evaluates the complete application once development is finished, testing interactions among components and integrations within scope. This testing is primarily performed by QA teams, though developers collaborate to ensure thorough test coverage and fix any issues found.
Automated Test Framework (ATF)
- ATF should be used to automate functional system testing to reduce time, cost, and reliance on UI-based tests.
- Use parameterized tests to avoid duplication and follow a clear naming standard for tests and test suites.
- Develop tests in Development instances and promote them to Test instances, preserving tests across clones via bundles, GIT, or saving before cloning.
- Do not execute tests in production; tests should be self-contained and utilize server-side or REST test steps when possible.
- Start tests with impersonation steps and be aware of browser throttling effects.
- Use Test Logs and Test Transactions for troubleshooting.
- Organize test suites by feature and provide clear descriptions.
User acceptance testing (UAT)
UAT is conducted by users, customers, or authorized stakeholders to verify that the application complies with business requirements and is ready for delivery. Developers remain responsible for fixing issues identified during system testing to ensure a smooth acceptance process.
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.