TestNg _ Objective Type Test
TestNg _ Objective Type Test
Name: *
Puneet Kumar
Email: *
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
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
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
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
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
d) None
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.
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
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
True
False
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
a) groups
b) dependsOnMethods
c) alwaysRun
d) optional
e) dataprovider
f) invoccationCount
Correct answer
d) optional
-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