Cursor, Copilot & AI Coding Tools: How Should QA Teams Test AI-Generated Code?
AI coding tools for QA teams need to test AI-generated code like they would any other new piece of software, looking for bugs, checking that it works as intended, and making sure it fits with the rest of the system. Tools for generating code using AI such as Cursor and GitHub Copilot have become very popular.
01Potential Issues
However, this does not necessarily improve quality in software.
Although the AI-generated code may be sufficient in simple cases, there may be underlying bugs, security issues, or incorrect logic in the code. As a result, QA teams face new challenges. Now that AI coding tools are in the mix, QA teams have to change how they test to make sure the AI-generated code is solid, secure, and actually fits the business needs.
02What Are AI Tools?
AI tools can assist developers in creating, understanding and improving code. Popular examples include:
- Cursor – AI-assisted tool to create, edit and debug.
- GitHub Copilot – AI tool that gives suggestions for code, functions and solutions within supported development tools.
- ChatGPT – assists with code writing, understanding errors and exploring solutions.
- Amazon Q Developer – assists with writing code, debugging, and understanding code.
Whilst AI coding tools can speed up development, suggested code must be thoroughly tested.
03Why Is AI-Generated Code Required Testing?
AI-generated code can have errors. Even though code may look correct, unexpected actions from users may cause issues.
For example, GitHub Copilot may be used to create validation in a registration form. Code may be correct at validating emails, however issues may occur with empty fields, duplicate accounts or special characters.
If the QA testing only includes testing valid data being entered, then these issues may not be caught.
Possible issues with AI-generated code include:
- Incorrect logic
- Missing validation
- Security issues
- Poor error handling
- Performance issues
- Compatibility issues
As such, AI-generated code should be treated in the same way as manually written code by QA teams.
04How to Test AI-Generated Code
Understand Requirements
Before beginning testing, QA engineers should be aware of what functionality should be provided in the application.
In relation to AI-created functionality, QA engineers should understand the requirements, acceptance criteria and the expected user interaction. For example, if AI has created code for a discount calculation in an eCommerce site, QA engineers should ensure that discounts are being correctly calculated based on the number of products purchased, specific coupon conditions and total cart value.
The aim of this is to ensure that the functionality matches the business requirements, rather than just that the code runs.
Both Positive and Negative Testing
AI-generated code may work well with typical user interactions but may fail with less common interactions.
QA teams should perform both positive and negative testing.
Example: Login functionality generated with Cursor.
Positive Testing:
- Correct login credentials.
- User is redirected correctly.
- User is shown correct dashboard.
Negative Testing:
- Incorrect password.
- Empty username and password.
- Special characters.
- Attempting to login with disabled account.
By testing a variety of inputs, potential issues can be found. Understanding the different types of test cases in software testing can help QA teams identify additional scenarios.
Regression Testing
As AI code suggestions can be added to existing code in order to provide new functionality, it may inadvertently break functionality in the application.
For example, if there are changes to checkout functionality made by AI, this could impact how coupons are applied, shipping costs or payment processing.
Once changes have been made to the code, QA teams should run regression testing to ensure existing functionality still works as intended.
If code is often updated using AI tools then running automated regression testing can be very useful.
Security and Validating Data
AI-generated code may contain security issues.
QA engineers should ensure that data is validated, authentication/authorisation is correct and sensitive data is handled correctly.
For example, if testing user profiles, QA engineers should verify that a user cannot access another user's data by altering a user ID in a URL or API call.
QA teams should also work closely with developers to ensure that potential security issues such as SQL injection, XSS and insecure API access are reviewed through appropriate web application penetration testing.
Even if the code has been created with a popular AI tool, security should not be assumed.
Testing API Responses and Integrations
Many modern applications make use of integrations with APIs. If AI-generated code is used for API functionality, it may work with successful responses but may not function as intended if an error is returned from an external service.
By using tools like Postman for API testing, QA engineers can test:
- Successful and failed API calls
- Status codes
- Missing/incorrect parameters
- Authentication issues
- Correct responses
- Timeouts and server errors
This ensures that the application behaves in the correct way if external services do not respond as expected.
Automated Testing
Using automated testing in QA can be efficient.
Tools such as Selenium, Playwright and Cypress allow repetitive testing to be automated, for example logging in, submitting forms, navigating between pages and completing checkouts.
However, even with automated testing, consideration should be made. If code was created with AI then automated tests may include incorrect assertions, or may miss important test scenarios.
QA engineers should verify that the automated testing is checking for the correct functionality.
Modern approaches, such as Playwright Test Agents for E2E automation, can also help QA teams streamline testing workflows while maintaining human oversight.
05Has the Role of QA Changed With AI Tools?
AI tools have changed the way testing is carried out in QA, however QA engineers are not being replaced.
As developers can quickly create code, QA teams may be presented with frequent changes in code to test. As such, testers should consider risk-based testing, exploratory testing, analysing requirements and creating automation tests.
Although AI is being used, human insight is needed. AI may not completely know what a real user would expect, the complex logic within the business, and full workflow of the application.
An experienced QA engineer has the capability to pick up on any gaps in testing which may be missed by automated tools and AI test cases.
This highlights why manual testing is still important, even with the growing adoption of AI-powered development tools.
06Best Practices
In order to ensure quality in software with AI-generated code, QA teams should:
- Carefully analyse requirements and acceptance criteria.
- Prioritise testing in high-risk areas such as payments, authentication and user data.
- Include edge cases and negative scenarios.
- Have reliable automated regression tests.
- Work in close communication with developers on changes made by AI.
- Report bugs clearly, including steps to reproduce and expected outcome.
With these best practices in place, teams can support faster development without compromising software quality.
07Conclusion
Tools like Cursor and GitHub Copilot are making development much quicker and easier. However, care must be taken with testing AI-generated code.
Functional testing, regression testing, security testing, API testing and real-world scenarios should be carried out to ensure any issues can be picked up.
Despite AI impacting software development, QA engineers will still be very important. The aim is to not only make testing quicker, but to also ensure all features work correctly and meet business requirements, providing a reliable user experience.
Although AI can speed up development for developers, the quality of the software will depend on how thoroughly the code is reviewed and tested.
As AI and machine learning in software testing continue to evolve, combining AI capabilities with human expertise remains essential for delivering reliable, secure and high-quality software.

