Worksheetsjunit
Total questions: 20
Worksheet time: 10mins
which of the following are framework of testings (testing frameworks)
JUNIT
JUNIT and WordPress
Selenium
Selenium and REST
MAVEN needs
web.xml
manifest.yml
pom.xml
all of them
@Test(expected = RuntimeException.class)
...
Assert.assertEquals(calculadora.suma(null, "2"), 3);
Assert OK
Assert Failure
Assert Exception
Assert.assertNotEquals(calculadoraSimple.suma("5", "2"), 3);
Assert OK
Assert Failure
Assert Exception
Assert.assertEquals(calculadoraSimple.suma(null, "2"), 5);
Assert OK
Assert Failure
Assert Exception
Assert.assertEquals(calculadoraSimple.suma("1", "2"), 5);
Assert OK
Assert Failure
Assert Exception
What is the most basic type of developer level test?
Integration Test
Universal Test
Unit Test
Basic Test
Is JUnit only report the first failure in a single test ?
Yes
No
Is it necessary to write the test case for every logic?
Yes
No
What is the use of Junit
To increase code coverage
To test unit of code thoroughly
To integrate with other units of code
What does assertSame() method use for assertion?
equals() method
isEqual() method
==
compare() method
Which of the below is an incorrect annotation with respect to JUnits?
@Junit
@AfterEach
@Test
@BeforeClass
Which method is used to verify the actual and expected results in Junits?
equals()
isEqual()
==
assert()
JUnits are used for which type of testing?
Blackbox Testing
Unit Testing
System Testing
Integration Testing
Assert contains a set of assert methods.
A - true
B - false
@RunWith and @Suite annotation are used to run the suite test.
A - false
B - true
Which of the following method of Assert class checks that an object is null?
A - void assert(Object object, boolean toCheckAsNull)
B - void assertCheck(Object object, boolean toCheckAsNull)
C - void assertNull(Object object)
D - void assertChecks(Object object, boolean toCheckAsNull)
Which of the following annotation causes that method run once after all tests have finished?
A - @Test
B - @After
C - @BeforeClass
D - @AfterClass
Which of the following describes Testing correctly?
A - Testing is the process of checking the functionality of the application whether it is working as per requirements.
B - Testing is the testing of single entity (class or method).
C - Both of the above.
D - None of the above.
