가장 많이 묻는 면접 질문과 답변 & 온라인 테스트
면접 준비, 온라인 테스트, 튜토리얼, 라이브 연습을 위한 학습 플랫폼

집중 학습 경로, 모의고사, 면접 준비 콘텐츠로 실력을 키우세요.

WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.

Prepare Interview

모의 시험

홈페이지로 설정

이 페이지 북마크

이메일 주소 구독
/ 면접 주제 / TestNG
WithoutBook LIVE Mock Interviews TestNG Related interview subjects: 13

Interview Questions and Answers

Know the top TestNG interview questions and answers for freshers and experienced candidates to prepare for job interviews.

Total 38 questions Interview Questions and Answers

The Best LIVE Mock Interview - You should go through before interview

Know the top TestNG interview questions and answers for freshers and experienced candidates to prepare for job interviews.

Interview Questions and Answers

Search a question to view the answer.

Freshers / Beginner level questions & answers

Ques 2

What are TestNG annotations? Provide some examples.

TestNG annotations are markers in the code that define how the methods below them should be run. Examples include @Test, @BeforeMethod, @AfterMethod, @BeforeClass, @AfterClass, @BeforeSuite, @AfterSuite, and more.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments
Ques 3

What is the purpose of the @DataProvider annotation?

The @DataProvider annotation is used to supply test methods with data. It allows you to define a method that returns an Object[][] where each Object[] can be assigned as parameters to the test method.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments
Ques 4

How can you parameterize tests in TestNG?

Tests can be parameterized in TestNG using the @Parameters annotation and defining parameters in the testng.xml file. Alternatively, the @DataProvider annotation can be used to provide test data.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments
Ques 5

What is the difference between @BeforeTest and @BeforeSuite annotations?

@BeforeSuite is executed before any test runs in the suite, while @BeforeTest is executed before any test method belonging to the specified tag in the testng.xml file.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments
Ques 7

What is the purpose of the @Parameters annotation?

The @Parameters annotation in TestNG is used to pass parameters to test methods. It is typically used in conjunction with the testng.xml file, where parameter values are specified.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments
Ques 8

Explain the purpose of the 'alwaysRun' attribute in TestNG annotations.

The 'alwaysRun' attribute, when set to 'true' in TestNG annotations, ensures that the annotated method (such as @BeforeMethod or @AfterMethod) always runs, even if the test method fails.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments
Ques 9

Explain the concept of testng.xml in TestNG.

The testng.xml file in TestNG is an XML configuration file that defines the structure and parameters for test execution. It allows you to customize the test suite, set parameters, and configure test groups.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments
Ques 10

Explain the use of the 'priority' attribute in the @Test annotation.

The 'priority' attribute in the @Test annotation allows you to specify the order in which test methods should be executed. Test methods with lower priority values are executed first.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments
Ques 11

What is the purpose of the 'timeOut' attribute in the @Test annotation?

The 'timeOut' attribute in the @Test annotation allows you to specify the maximum time (in milliseconds) that a test method should take to complete its execution. If the time exceeds this limit, the method is marked as a failure.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments
Ques 12

Explain the concept of testng-failed.xml in TestNG.

The testng-failed.xml file in TestNG is automatically generated when a test run has failures. It contains only the failed test methods and can be used to rerun only the failed tests.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments
Ques 13

What is the purpose of the 'alwaysRun' attribute in the @Test annotation?

The 'alwaysRun' attribute in the @Test annotation ensures that the annotated method (such as @BeforeMethod or @AfterMethod) always runs, even if the test method fails.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments
Ques 14

What is the purpose of the 'dependsOnMethods' attribute in TestNG?

The 'dependsOnMethods' attribute in TestNG allows you to specify dependencies between test methods. A test method will only be executed if the methods specified in 'dependsOnMethods' pass successfully.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments
Ques 15

Explain the use of the 'enabled' attribute in the @Test annotation.

The 'enabled' attribute in the @Test annotation allows you to enable or disable a test method. If set to 'false', the test method will be skipped during test execution.
복습용 저장

복습용 저장

이 항목을 북마크하거나, 어렵게 표시하거나, 복습 세트에 넣을 수 있습니다.

내 학습 라이브러리 열기
도움이 되었나요?
Add Comment View Comments

Most helpful rated by users:

Copyright © 2026, WithoutBook.