0% found this document useful (0 votes)
81 views5 pages

Junit Mock Test IV

This a document for testing questions

Uploaded by

Subendu Rakshit
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)
81 views5 pages

Junit Mock Test IV

This a document for testing questions

Uploaded by

Subendu Rakshit
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/ 5

JUNIT MOCK TEST

http://www.tutorialspoint.com Copyright © tutorialspoint.com

This section presents you various set of Mock Tests related to JUnit Framework. You can
download these sample mock tests at your local machine and solve offline at your convenience.
Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

JUNIT MOCK TEST IV

Q 1 - @RunWith and @Suite annotation are used to run the suite test.

A - false

B - true

Q 2 - A test method annotated with @Ignore will not be executed.

A - false

B - true

Q 3 - If a test class is annotated with @Ignore then none of its test methods will be
executed.

A - false

B - true

Q 4 - @Test annotation along with timeout attribute can be used to set timeout of a
test case.

A - false

B - true

Q 5 - @Test annotation along with expected attribute can be used to test the code
whether code throws desired exception or not.

A - true

B - false
Q 6 - Parameterized tests allow developer to run the same test over and over again
using same values.

A - true

B - false

Q 7 - Annotate test class with @RunWithParameterized. class to create a parameterized test


case.

A - true

B - false

Q 8 - Testing is the process of checking the functionality of the application whether it


is working as per requirements.

A - true

B - false

Q 9 - Testing is the testing of single entity classormethod.

A - true

B - false

Q 10 - Automation runs test cases significantly faster than human resources.

A - true

B - false

Q 11 - Automated Test cases are executed by using automation tool so less tester are
required in automation testing.

A - true

B - false

Q 12 - JUnit is a proprietory framework.

A - true

B - false

Q 13 - JUnit 4.0 provides Annotations to identify the test methods.

A - true

B - false
Q 14 - JUnit provides Assertions for testing expected results.

A - true

B - false

Q 15 - JUnit provides Test runners for running tests.

A - true

B - false

Q 16 - JUnit tests can be run automatically and they check their own results and
provide immediate feedback.

A - true

B - false

Q 17 - Unit Tests are to be written before the code during development in order to
help coders write the best code.

A - true

B - false

Q 18 - Unit Tests are written after the code during development in order to help
coders test the code.

A - true

B - false

Q 19 - Eclipse supports JUnit integration using its plugin.

A - true

B - false

Q 20 - Fixture includes setUp method which runs before every test invocation.

A - true

B - false

Q 21 - Fixture includes setUp method which runs once when test class loads.

A - true

B - false

Q 22 - Fixture includes tearDown method which runs after every test method.
A - true

B - false

Q 23 - Fixture includes tearDown method which runs after all test methods get
executed.

A - true

B - false

Q 24 - Assert contains a set of assert methods.

A - true

B - false

Q 25 - TestCase contains a test case and defines the fixture to run multiple tests.

A - true

B - false

ANSWER SHEET

Question Number Answer Key

1 B

2 B

3 B

4 B

5 A

6 B

7 A

8 A

9 B

10 A

11 A

12 B

13 A

14 A

15 A

16 A
17 A

18 B

19 A

20 A

21 B

22 A

23 B

24 A

25 A

Loading [MathJax]/jax/output/HTML-CSS/jax.js

You might also like