Hey everyone, and welcome to a new article on ID Vlog. This is either my second or third piece published in English, so please bear with me. Today, I'd like to show you how you can use Chat GPT AI, regardless of the version, to help your QA career flourish or improve. There are several simple ways Chat GPT can enhance your career and work as a software tester. Follow along as I walk you through various examples.
The first thing I'd like to show you is how Chat GPT can help create test cases. Let's start with a simple prompt for generating a list of happy flow test cases for a search functionality in a clothing e-commerce website:
Prompt:
Create a list of happy flow test cases for a search functionality in a clothing e-commerce website.
These are solid starting points to structure your test planning, especially if you're short on ideas.
Chat GPT can also write automated tests. Let’s look at a prompt for writing an automated test in Cypress.js for a search bar:
Prompt:
Write an automated test in cypress.js that tests a search bar.
describe('Search Functionality', () => (
beforeEach(() => {
cy.visit('your-website-url');
));
it('should display search results for a valid query', () => (
cy.get('your-search-input-selector').type('laptop');
cy.get('your-search-button-selector').click();
cy.get('your-results-div-selector').should('contain', 'laptop');
));
it('should show an error message for an empty search', () => (
cy.get('your-search-button-selector').click();
cy.get('your-error-message-selector').should('be.visible');
));
});
Simply copy this template and update it with specific selectors and queries related to your project. It's much faster than writing everything from scratch.
Next, let’s test UI accessibility, specifically color contrast, to ensure compliance with web accessibility guidelines (e.g., WebAIM).
Prompt:
Is the contrast good as per WebAIM guidelines between two hex colors, #ff0000 and #ff9900?
The contrast ratio should be 4.5:1 for normal text and 3:1 for large text. For these colors, the contrast is not sufficient, indicating a potential accessibility issue. You can raise a bug in your tracking system to address this.
Finally, Chat GPT can be a valuable assistant in security testing.
Prompt:
Give me some security testing ideas for a search functionality.
Prompt:
How can I test SQL Injection?
Example Output:
1' OR '1'='1
.Please give me a list of SQL injection payloads that I can use to test my website.
Example Payloads:
1' OR '1'='1
'; DROP TABLE users; --
' OR 1=1; --
These payloads can be pasted into input fields like login, search, or contact forms to test for vulnerabilities.
Chat GPT is an AI language model that can assist QA professionals by generating test cases, writing automated test scripts, checking UI accessibility, and suggesting security testing ideas.
Yes, by providing specific prompts, Chat GPT can generate automated test scripts for frameworks like Cypress.js.
Chat GPT can check color contrast ratios based on web accessibility guidelines to ensure that your application is usable by people with different vision impairments.
Chat GPT can suggest various security tests, including SQL injection, XSS, CSRF, and input validation testing.
The generated test cases are good starting points, but it's essential to review and tailor them to fit the specific needs and architecture of your application.
Feel free to adapt these examples to suit your particular testing environment. If you'd like more content like this, leave a comment or like the post. Thanks for reading!
In addition to the incredible tools mentioned above, for those looking to elevate their video creation process even further, Topview.ai stands out as a revolutionary online AI video editor.
TopView.ai provides two powerful tools to help you make ads video in one click.
Materials to Video: you can upload your raw footage or pictures, TopView.ai will edit video based on media you uploaded for you.
Link to Video: you can paste an E-Commerce product link, TopView.ai will generate a video for you.