0% found this document useful (0 votes)
3 views

TestNg _ Objective Type Test

The document is a TestNg objective type test with a total score of 12 out of 15 points, taken by Puneet Kumar. It includes various questions related to TestNg annotations and their functionalities. The test also captures personal information such as name, email, and phone number.

Uploaded by

Puneet Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

TestNg _ Objective Type Test

The document is a TestNg objective type test with a total score of 12 out of 15 points, taken by Puneet Kumar. It includes various questions related to TestNg annotations and their functionalities. The test also captures personal information such as name, email, and phone number.

Uploaded by

Puneet Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

12/4/22, 1:38 PM TestNg : Objective Type Test

TestNg : Objective Type Test Total points 12/15

Name: *

Puneet Kumar

Email: *

[email protected]

Phone: *

9654552319

Counsellors Name *

Mamta

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-hMI… 1/21
12/4/22, 1:38 PM TestNg : Objective Type Test

Batch Start Month *

January

February

March

April

May

June

July

August

September

October

November

December

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-hMI… 2/21
12/4/22, 1:38 PM TestNg : Objective Type Test

Q1: A method with '@BeforeMethod' annotation in a class will execute 1/1


_____

a)Before the first test method in the class executes

b)Only once before the execution of the @Test, annotated methods begins

c)Before each and every test method in the class i.e., the method with
@BeforeMethod annotation will execute for every test method in the class

d) None

Q2: A method with '@BeforeTest' annotation in a class will execute _______ 1/1

a)Before every test method in the class

b)Once before the execution of test methods in the class begins

c)After every test method in the class

d)None

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-hMI… 3/21
12/4/22, 1:38 PM TestNg : Objective Type Test

Q3: Select all the correct attributes of @Test annotation: 1/1

a)groups

b)enabled

c)priority

d)dependsOnGroups

e)elementToBeHidden

f) a,b,c,d

Q4: If a test method failed, then its dependent method will ________ 1/1

a) Always Execute

b) Never execute

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-hMI… 4/21
12/4/22, 1:38 PM TestNg : Objective Type Test

Q5: If no priority is set for the test methods then the execution order will be 1/1

a) Random

b) Based on the Alphabetical naming conventions of the test methods

c) Order in which written

d) None

Q6: If @Test annotation is put at class level then ______ ? 1/1

a)All the public methods of the class become test methods and only public
methods will execute as test methods.

b)All the methods including public, private, protected, become test methods and all
will execute as test methods.

c)TestNG run time exception will be thrown

d)None

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-hMI… 5/21
12/4/22, 1:38 PM TestNg : Objective Type Test

1/1
Q7: If parallel attribute of a test suite in the testNG.xml file is set as
'methods' as below:
parallel="methods"
then? Select the correct statement:

a)All the test methods in the class will run in parallel in the same thread

b)All the test methods in the class will run in parallel in separate threads

c)None

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-hMI… 6/21
12/4/22, 1:38 PM TestNg : Objective Type Test

Q8. Below sequence of execution of all TestNG annotations is _______? 1/1


(TRUE/FALSE)
@BeforeSuite
@BeforeTest
@BeforeClass
@BeforeMethod
@Test
@AfterMethod
@AfterClass
@AfterTest
@AfterSuite

True

False

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-hMI… 7/21
12/4/22, 1:38 PM TestNg : Objective Type Test

1/1
Q9. What is difference between Suite, Test, and Class in below statement
are TRUE/FALSE?
Suite: a suite is made of one or more tests.
Test: a test is made of one or more classes.
Class: a class is made of one or more methods.

True

False

1/1
Q10. Below mentioned statement is TRUE/FALSE?
"A method annotated with @Test is called test method which serves as
a unit test. In the @Test method, we will write the logic of the application
which we want to automate."
a) TRUE
b) FALSE

True

False

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-hMI… 8/21
12/4/22, 1:38 PM TestNg : Objective Type Test

Q11. TestNG gives highest precedence to "DependsOnMethods" over 1/1


"Priority" keywords, this statement is ____?
a) TRUE
b) FALSE

True

False

Q12. TestNG is library not a framework, this statement is _________? 0/1

True

False

Correct answer

True

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-hMI… 9/21
12/4/22, 1:38 PM TestNg : Objective Type Test

Q13: If parallel attribute of a test suite in the testNG.xml file is set as 0/1
'methods' and the test methods also have priority attributes set for them,
then: ? Select the correct statement:

a)The test execution will happen as per the priority set for the test methods

b)The parallel="methods" attribute of the test suite will overpower the priorities of
the test methods and execute all the test methods in parallel in separate threads

c) Both wrong

Correct answer

a)The test execution will happen as per the priority set for the test methods

Q14. Which TestNG annotation used to pass user input at runtime? 1/1

a) @Optional

b) @Parameters

c) @Parameter

d) @DataProvide

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-h… 10/21
12/4/22, 1:38 PM TestNg : Objective Type Test

Q15. Which is not TestNG keyword? 0/1

a) groups

b) dependsOnMethods

c) alwaysRun

d) optional

e) dataprovider

f) invoccationCount

Correct answer

d) optional

⏩ (DO NOT MODIFY THIS ANSWER-for official purposes only ) *


FORM_TIMER_UNIQUE_IDENTIFIER
This is your unique identifier. Please do not modify this.

-NGvwpKT_reb5162eIJ6

This content is neither created nor endorsed by Google. - Terms of Service - Privacy Policy

Forms
https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-hM… 11/21
12/4/22, 1:38 PM TestNg : Objective Type Test

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-h… 12/21
12/4/22, 1:38 PM TestNg : Objective Type Test

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-h… 13/21
12/4/22, 1:38 PM TestNg : Objective Type Test

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-h… 14/21
12/4/22, 1:38 PM TestNg : Objective Type Test

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-h… 15/21
12/4/22, 1:38 PM TestNg : Objective Type Test

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-h… 16/21
12/4/22, 1:38 PM TestNg : Objective Type Test

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-h… 17/21
12/4/22, 1:38 PM TestNg : Objective Type Test

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-h… 18/21
12/4/22, 1:38 PM TestNg : Objective Type Test

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-h… 19/21
12/4/22, 1:38 PM TestNg : Objective Type Test

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-h… 20/21
12/4/22, 1:38 PM TestNg : Objective Type Test

https://docs.google.com/forms/d/e/1FAIpQLSdrrXYQ-UlVin92CiP3vju3-m-zLBfSSQGkykmHafTwp3S2zw/viewscore?viewscore=AE0zAgDtVMPfZaOKy950P6XvxRdPxDL6GDmXcJG8ufyJLPOWcoTwzOywF9pr-h… 21/21

You might also like