Best Practices for Testing Scripted REST APIs in ServiceNow: Built-in Tools or External Solutions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2024 03:44 AM
Hello Community,
I’m relatively new to ServiceNow and am looking to implement comprehensive testing for Scripted REST APIs. I would love to hear your recommendations, experiences, and best practices regarding the ease of creation, maintenance, flexibility, and regular execution of tests.
The key question for me is: Should I use ServiceNow's built-in functionality (e.g., ATF) for testing, or would it be better to rely on external tools (like Postman) or even custom-coded solutions (e.g., JavaScript-based testing frameworks)?
Here are some specific points I’d like to explore:
Flexibility: How flexible is ServiceNow for verifying responses, schemas, etc.? Can we utilize data providers for testing multiple inputs/outputs, or does each test need to be created individually?
Ease of Maintenance: In my experience with code-based testing, it’s often easier to maintain and create tests since you can see all of them in one view, edit them quickly, and leverage features like data providers to create reusable tests with varying data. How does this compare with the built-in testing functionality in ServiceNow?
Scheduling and Automation: A key aspect for me is the ability to schedule and execute tests regularly. With code-based approaches, this can easily be achieved via CI/CD pipelines using tools like GitHub or GitLab. Is there a comparable mechanism for achieving this with ServiceNow's built-in tools?
Comprehensive Approach: My goal is to implement testing in the most robust and scalable way possible. I’m open to both built-in and external solutions, so I’d love to hear your opinions on the trade-offs between these approaches.
If you’ve worked with Scripted REST API testing in ServiceNow, what has worked best for you? Are there scenarios where the built-in tools shine or where external solutions clearly outperform them?
Thank you in advance for your insights and advice!