Member-only story

Tips & Techniques on how to identify and manage duplicate test cases in a large test suite say TestNG framework. suppose, 1000 testcases in TestNG framework.

Mukta Sharma
4 min readNov 12, 2024

--

Begin by reviewing the descriptions and objectives of your test cases.

To start with in easy language, you can create a spreadsheet or use a test management tool where you can list all the test case titles and their corresponding descriptions. As you go through each test case, pay attention to any similarities in the test objectives, the steps involved, or the expected results. This will help you in identifying the duplicates.

Once you’ve spotted any cases that seem redundant, flag them for further investigation to ensure your test suite remains efficient and streamlined. Or, you can use a tag <duplicate> and use the same tag for each such testcase so that, next time, when you filter it out, you can easily get a list.

2. Next, examine the actual test code to identify any similarities. Use an integrated development environment (IDE) such as IntelliJ IDEA or Eclipse to search for common code patterns across your test classes.

How?

Look for tests that utilize the same locators, perform similar actions, or make identical assertions. Additionally, be mindful of tests that may only differ…

--

--

Mukta Sharma
Mukta Sharma

Written by Mukta Sharma

Hi,I write on software testing( Manual testing,Automation,API,Mobile,InterviewQ&A etc.). My YT link :https://www.youtube.com/channel/UCppaYb_VotTvHxb6b3pE_5Q

No responses yet