Automate API testing for our Node.js application using Newman and integrate it into our GitHub Actions CI workflow.
Pros:
Automated Testing: Newman testing allows for the automation of API testing, ensuring that our API endpoints function correctly.
Continuous Integration: Integrating Newman testing into GitHub Actions enables continuous integration, providing quick feedback on the health of our API with each code push.
Validation of API Contracts: Newman tests will help us validate that our API contracts are met, ensuring that responses adhere to the expected format and structure.
Cons:
Learning Curve: There might be a learning curve for team members who are new to Newman or Postman, especially if they are not familiar with API testing tools.
Configuration Overhead: Setting up Newman testing in GitHub Actions involves configuration steps, and maintaining these configurations can add some overhead.
Dependency on External Service: Newman relies on Postman collections, and if there are changes or issues with the Postman service, it could impact our testing process.
Accepted Criteria:
Clear Documentation: Define clear and detailed documentation for setting up Newman testing in GitHub Actions, including instructions for configuring Newman, specifying environment variables, and understanding the workflow.
Integration with CI Workflow: Ensure that Newman testing is seamlessly integrated into our existing GitHub Actions CI workflow, running on relevant triggers such as pushes to the main branch.
Parameterization and Configuration: Parameterize the Newman testing configuration, allowing flexibility for different environments and scenarios.
Testing of Critical API Endpoints: Focus on testing critical API endpoints and functionalities to ensure that the most important parts of our application are thoroughly validated.
Reporting and Notifications: Implement clear reporting mechanisms and notifications in the GitHub Actions workflow to alert the team of test results, especially failures.
Resource Optimization: Optimize the GitHub Actions workflow to ensure efficient resource usage, considering factors such as parallel execution and minimizing unnecessary steps.
Regular Maintenance: Establish a plan for regular maintenance, ensuring that Newman tests and the GitHub Actions workflow are updated as the application evolves.
Additional Information:
Node.js version: 20.x
Newman version: Should be investigated
Any specific considerations: Full Cycle of each processor might be required e.g Build, Test, Start
Further conversion of nats-rest-proxy to be a valid GitHub action that can handle requests from CI
Implement Newman Testing in GitHub Actions CI
Objective:
Automate API testing for our Node.js application using Newman and integrate it into our GitHub Actions CI workflow.
Pros:
Cons:
Accepted Criteria:
Additional Information:
References: