blog-img

Test Strategy


We recommend the following test strategy which can be customised as per your specific needs.

  1. Test the code for runnability (System integrity Testing)
  2. Fix if there are missing imports
  3. Test the code with sample data by loading the data models.( Functional Testing)
  4. Fix the story, prompt or code for functional issues.
  5. Test the software for hosting environment for environment testing (Environment Testing)
  6. Fix the library versions through prompt or code.
  7. Finally, perform the end user testing (UAT)
  8. Fix the story, prompt or code.



Unit testing :

The promptset should include the unit test code generation, especially because the test cases can be built in the promptset itself.


Backend Testing

The test strategy for backend like in NodeJS framework should be add the testing of each API endpoints.

You can add the prompt for testing in the path of testing with each endpoint tester name @Asset-Action-‘test.js’. Rest of the details are common.



Frontend Testing

The test strategy for an AI generated software should have automated unit testing. You can add the test coding framework in the promptset itself to add code in the component.spec.ts file for each of the components. Therefore the first step should be to ensure that the unit tests are able to call the APIs with dummy data generated by the code generator itself.


Test Backend & Frontend together

Run the backend and frontend together in their respective directories:


Backend: npm run start

Frontend: npm run start


And then fire the test from frontend in a separate console. You should see the number of successful and failed tests.


Handling failures:

If a set of tests are failing, you need to follow your testing strategy.

  • Fix code for immediate debugging.
  • Improve story if the gap was in story.
  • Improve prompt if the gap was in the prompt set.
  • Improve AI if the generated code is faulty. This is the toughest.



Next : How to stage the codebase for collaborative testing, improvement and deployment?



Updated: Oct 9, 2024