In this video, Sparsh Kesari (@sparsh_kesari_), DevRel Engineer at LambdaTest, deep dives into using ChatGPT for test automation. He takes you through a step-by-step journey covering common test scenarios to create an automation testing pipeline using ChatGPT, built on top of GPT-3.5
00:07 Introduction
00:18 What is ChatGPT
00:50 Can ChatGPT be used for Test Automation
01:40 Running automation test script using ChatGPT
05:42 Conclusion
Introduction to ChatGPT: The video starts with an introduction to ChatGPT, explaining its release by OpenAI on November 30th and its rapid gain in popularity, amassing over 1 million users within the first five days of launch. It highlights ChatGPT's use of cutting-edge natural language processing and deep learning technologies.
ChatGPT's Application in Test Automation: It delves into how ChatGPT can be utilized in test automation, including generating test cases or scenarios based on user requirements, creating test scripts or automation testing routes, and writing scripts for integrating and running tests on platforms like LambdaTest.
Code Generation and Limitations: The video notes that while ChatGPT can generate code that is close to runnable, it's not always perfect. It may contain syntax errors or omit crucial steps due to context gaps, suggesting that experienced developers can easily tweak, debug, and run the generated code.
Creating a Simple Automation Test Script: A practical demonstration shows ChatGPT generating a simple Selenium with Java code snippet to open Google.com, print its title, and detailing how to run this test on LambdaTest’s cloud Selenium grid.
Handling Complex Test Scenarios: The video tests ChatGPT’s ability to handle more complex scenarios, such as creating a test case involving multiple microservices responsible for handling Selenium tests in a Linux Docker container environment. ChatGPT successfully generates an automation test case for this scenario.
Generating Test Definitions for Services: ChatGPT is tasked with creating revised test definitions for positive and negative test cases across four services within a hypothetical testing platform, showcasing its capability to handle detailed technical requirements.
Configuring Continuous Testing with GitHub Actions: The video further explores ChatGPT's utility in continuous testing by asking it to write a GitHub action for running tests at a specified time and fetching test results from LambdaTest using its APIs.
Conclusions and Learnings: It concludes with reflections on ChatGPT's current stage of development, emphasizing its ongoing improvements and the need for users to stay updated with its features and capabilities. The video suggests that with the right tooling, ChatGPT can significantly ease the process of getting started with test automation, allowing testers to focus more on test cases themselves.