frmscoe / General-Issues

This repo exists to track current work and any issues within the FRMS CoE
2 stars 0 forks source link

Implement Newman Testing in GitHub Actions CI for Processors #337

Closed cshezi closed 5 months ago

cshezi commented 7 months ago

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:

  1. Automated Testing: Newman testing allows for the automation of API testing, ensuring that our API endpoints function correctly.
  2. Continuous Integration: Integrating Newman testing into GitHub Actions enables continuous integration, providing quick feedback on the health of our API with each code push.
  3. 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:

  1. 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.
  2. Configuration Overhead: Setting up Newman testing in GitHub Actions involves configuration steps, and maintaining these configurations can add some overhead.
  3. 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:

  1. 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.
  2. 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.
  3. Parameterization and Configuration: Parameterize the Newman testing configuration, allowing flexibility for different environments and scenarios.
  4. 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.
  5. Reporting and Notifications: Implement clear reporting mechanisms and notifications in the GitHub Actions workflow to alert the team of test results, especially failures.
  6. Resource Optimization: Optimize the GitHub Actions workflow to ensure efficient resource usage, considering factors such as parallel execution and minimizing unnecessary steps.
  7. 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:

References:

cshezi commented 6 months ago

Additionally, Find a convenient way to present the report to the developer