{"id":43700,"date":"2023-06-06T07:11:29","date_gmt":"2023-06-06T11:11:29","guid":{"rendered":"https:\/\/centricconsulting.com\/?p=43700"},"modified":"2023-07-07T15:25:17","modified_gmt":"2023-07-07T19:25:17","slug":"transform-your-software-testing-methods-with-the-help-of-ai-and-chatgpt","status":"publish","type":"post","link":"https:\/\/centricconsulting.com\/blog\/transform-your-software-testing-methods-with-the-help-of-ai-and-chatgpt\/","title":{"rendered":"Transform Your Software Testing Methods with the Help of AI and ChatGPT"},"content":{"rendered":"

In the right circumstances, using AI and ChatGPT for software testing ideas can be a lifesaver when you aren\u2019t entirely sure where to start or need additional test ideas. In this blog, we\u2019ll show how these tools can help test teams develop useful, actionable test ideas.<\/h2>\n
\n

When I talk to our clients\u2019 developers and testing specialists about how they develop ideas about what testing should cover, some themes readily emerge. One theme focuses on meeting business needs by emulating the actions and activities of a person using the software. The other is to base testing on documented requirements or acceptance criteria, presented as \u201cthe software must do this<\/em> and not that.\u201d<\/em><\/p>\n

These seem reasonable starting points. However, there are many things beyond simple acceptance criteria that need testing. Depending on how an organization approaches testing, this might not be a problem if a team handles performance, accessibility, security testing and other non-functional requirements (NFRs). If there isn\u2019t a team to handle NFRs, and testers have limited experience with them, how would they even know to think about them?<\/p>\n

Another problem I see is companies assigning testers to a project with little understanding of how the software is used.<\/strong> Then, they brush this off, saying, \u201cThere are the requirements. Just test it.\u201d<\/p>\n

Story or function-level requirements rarely give testers unfamiliar with the application or business environment the information needed to do meaningful integration or regression testing and avoid potential problems.<\/p>\n

A fair number of people are looking to ChatGPT, AI, machine learning and other trendy tools and ideas to help solve these challenges<\/a>.<\/p>\n

Can ChatGPT really help?<\/strong> Excellent question. I began experimenting with it to learn what it might \u2013 and might not \u2013 do for test ideas.<\/p>\n

Using ChatGPT to Develop Test Ideas<\/h2>\n

ChatGPT<\/a> is an artificial intelligence language model developed by OpenAI<\/a> that uses advanced natural language processing (NLP) techniques to generate human-like responses to text prompts. Data scientists trained it on a massive dataset of text, allowing ChatGPT to learn the nuances and patterns of human language and generate natural-sounding responses.<\/p>\n

We\u2019ve seen how AI and ChatGPT can help with acceptance criteria<\/a> for stories. Looking for ideas around testing is similar but slightly different. When test teams are unsure about how to test something, ChatGPT can help fill the gap. To make that work, the context of the problem, specifics to the situation, and the specific ask or prompt.<\/strong><\/p>\n

Let\u2019s look at an example. A tester needs to test a signon screen. They give the context of their situation, \u201cI am testing a user signon screen.\u201d Then add specifics about their situation, like \u201crequires a usersignon and password.\u201d Then the specific ask, \u201cWhat things would be good to test for?\u201d\u00a0 Here\u2019s what my request to ChatGPT looked like:  If I am testing a user signon screen that requires a usersignon and password, what things would be good to test for? <\/span>\n

The response I received from ChatGPT (version 3) looked like this:<\/strong><\/p>\n\n\n\n
When testing a user sign-on screen that requires a username and password, there are several important aspects to consider. Here are some key areas to focus on during your testing:<\/strong><\/p>\n
    \n
  1. Validation and error handling:<\/strong> Check if the system properly validates input fields, such as enforcing minimum and maximum length requirements, allowed characters, and format constraints. Test how the application handles incorrect or incomplete entries, and ensure appropriate error messages are displayed.<\/li>\n
  2. Authentication:<\/strong> Verify that the sign-on process authenticates users correctly. Test various scenarios, including valid credentials, incorrect passwords, non-existent usernames, and account lockouts after multiple failed attempts.<\/li>\n
  3. Password security:<\/strong> Assess the system’s password security measures<\/a>. Verify if it enforces strong password policies (e.g., minimum length, complexity requirements) and handles password storage securely (e.g., using encryption and hashing).<\/li>\n
  4. Remember me and session management:<\/strong> If the sign-on screen includes a “Remember me” option, test if it preserves the user session across browser sessions correctly. Verify that session timeouts and automatic logouts work as intended.<\/li>\n
  5. Password recovery and reset:<\/strong> Evaluate the password recovery and reset functionality. Test whether the system allows users to reset their passwords securely, through mechanisms like email verification, security questions, or password reset links.<\/li>\n
  6. Cross-browser and cross-device compatibility:<\/strong> Test the sign-on screen on various browsers (e.g., Chrome, Firefox, Safari, Edge) and devices (e.g., desktops, tablets, smartphones) to ensure consistent functionality and display across different platforms.<\/li>\n
  7. Accessibility:<\/strong> Verify that the sign-on screen is accessible to users with disabilities. Test keyboard navigation, screen reader compatibility, and compliance with accessibility guidelines (e.g., WCAG 2.0 or 2.1).<\/li>\n
  8. Usability and user experience:<\/strong> Evaluate the overall usability of the sign-on screen. Ensure that it provides clear instructions, an intuitive layout, and a user-friendly interface. Test for factors such as responsiveness, load times, and error feedback.<\/li>\n
  9. Integration and error logging:<\/strong> If the sign-on screen communicates with other systems or APIs, test the integration points to ensure smooth data transfer and error handling. Monitor and verify if error logs are generated correctly for troubleshooting purposes.<\/li>\n
  10. Security vulnerabilities:<\/strong> Conduct security testing to identify common vulnerabilities like SQL injection, cross-site scripting (XSS), cross-site request forgery (CSRF), and session hijacking. This helps ensure the sign-on screen is resilient to potential attacks.<\/li>\n
  11. Performance and scalability:<\/strong> Test the performance of the sign-on screen under different loads, including scenarios with multiple concurrent users. Assess if the system scales well and doesn’t experience slowdowns or crashes under heavy usage.<\/li>\n<\/ol>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

    Remember, this is a general guideline, and the specific requirements and context of your application might introduce additional areas for testing.<\/p>\n

    This isn\u2019t a bad list of ideas. Most experienced testers would probably make a similar list of ideas as their starting point. One interesting thing to consider is the fifth point \u2013 password recovery and reset.<\/p>\n

    I did not mention the ability to change or recover passwords, but there is a presumption that some capability to do so should exist.<\/p>\n

    Using AI and ChatGPT in Software Testing for a Step-By-Step Process<\/h2>\n

    You can also drill down into a response point and get more detailed information. We can reference the items ChatGPT generated, like point five, and ask the following:  How would I test point 5 in detail? <\/span>\n

    ChatGPT returned the following response:<\/strong><\/p>\n\n\n\n
    To test the password recovery and reset functionality in detail, you can follow these steps:<\/strong><\/p>\n
      \n
    1. Test password recovery options:<\/strong> Verify that the system provides multiple password recovery options, such as email verification, security questions, or password reset links. Test each option to ensure they work as intended.<\/li>\n<\/ol>\n