- Which JUnit annotation is used for parameterized tests?
View Answer
Correct answer: A — @ParameterizedTest
- In PyTest, parameterized tests are defined using:
View Answer
Correct answer: A — @pytest.mark.parametrize
- NUnit supports parameterized tests using:
View Answer
Correct answer: A — [TestCase]
- Which JUnit annotation runs once before all tests in a class?
View Answer
Correct answer: A — @BeforeClass
- Which JUnit annotation runs once after all tests in a class?
View Answer
Correct answer: A — @AfterClass
- PyTest fixtures can have which scope?
View Answer
Correct answer: A — function, class, module, session
- NUnit supports setup methods using:
View Answer
Correct answer: A — [SetUp]
- Which JUnit assertion checks if two objects are the same?
View Answer
Correct answer: A — assertSame
- PyTest supports skipping tests conditionally using:
View Answer
Correct answer: A — @pytest.mark.skipif
- NUnit supports ignoring tests with reason using:
View Answer
Correct answer: A — [Ignore("reason")]
- What will be printed?
1 import org.junit.jupiter.api.Test; 2 import static org.junit.jupiter.api.Assertions.assertEquals; 3 public class EduinqAdvancedTest { 4 @Test 5 void testAddition() { 6 assertEquals(5, 2+3); 7 System.out.println("Eduinq Advanced JUnit"); 8 } 9 } View Answer
Correct answer: A — Eduinq Advanced JUnit
- PyTest supports marking tests as expected to fail using:
View Answer
Correct answer: A — @pytest.mark.xfail
- NUnit supports test case sources using:
View Answer
Correct answer: A — [TestCaseSource]
- JUnit supports exception testing using:
View Answer
Correct answer: A — assertThrows
- PyTest supports running tests in parallel using:
View Answer
Correct answer: A — pytest-xdist
- NUnit supports running tests in parallel using:
View Answer
Correct answer: A — [Parallelizable]
- Which JUnit assertion checks if an object is not null?
View Answer
Correct answer: A — assertNotNull
- PyTest supports custom markers defined in:
View Answer
Correct answer: A — pytest.ini
- NUnit supports teardown methods using:
View Answer
Correct answer: A — [TearDown]
- JUnit supports grouping tests using:
View Answer
Correct answer: A — Test suites
- PyTest supports fixtures with autouse option to:
View Answer
Correct answer: A — Run automatically without explicit reference
- NUnit supports categories using:
View Answer
Correct answer: A — [Category]
- Which JUnit annotation disables a test?
View Answer
Correct answer: A — @Disabled
- PyTest supports fixtures with yield for:
View Answer
Correct answer: A — Setup and teardown in one function
- NUnit supports expected exceptions using:
View Answer
Correct answer: A — Assert.Throws
- JUnit supports nested tests using:
View Answer
Correct answer: A — @Nested
- PyTest supports parameterized fixtures using:
View Answer
Correct answer: A — @pytest.fixture(params=[...])
- NUnit supports test case repetition using:
View Answer
Correct answer: A — [Repeat]
- Which JUnit assertion checks if two arrays are equal?
View Answer
Correct answer: A — assertArrayEquals
- PyTest supports skipping tests dynamically using:
View Answer
Correct answer: A — pytest.skip()
- NUnit supports constraints using:
View Answer
Correct answer: A — Assert.That
- JUnit supports timeout testing using:
View Answer
Correct answer: A — @Timeout
- PyTest supports fixtures with finalizer using:
View Answer
Correct answer: A — request.addfinalizer
- NUnit supports test case data using:
View Answer
Correct answer: A — [TestCaseData]
- Which JUnit assertion checks if a condition is false?
View Answer
Correct answer: A — assertFalse
- PyTest supports marking tests with custom IDs using:
View Answer
Correct answer: A — ids parameter in parametrize
- NUnit supports multiple test cases using:
View Answer
Correct answer: A — [TestCase(...)]
- JUnit supports repeated tests using:
View Answer
Correct answer: A — @RepeatedTest
- PyTest supports marking tests with custom markers using:
View Answer
Correct answer: A — @pytest.mark.<marker>
- NUnit supports timeout for tests using:
View Answer
Correct answer: A — [Timeout]
- Which JUnit assertion checks if two objects are not the same?
View Answer
Correct answer: A — assertNotSame
- PyTest supports marking tests with custom conditions using:
View Answer
Correct answer: B — @pytest.mark.skipif
- NUnit supports retrying failed tests using:
View Answer
Correct answer: A — [Retry]
- Which JUnit annotation is used to provide display names for tests?
View Answer
Correct answer: A — @DisplayName
- PyTest supports marking tests to run only on certain platforms using:
View Answer
Correct answer: A — @pytest.mark.skipif(sys.platform == ...)
- NUnit supports combining multiple assertions using:
View Answer
Correct answer: A — Assert.Multiple
- Which JUnit annotation is used for repeated tests?
View Answer
Correct answer: A — @RepeatedTest
- PyTest supports dynamically skipping tests using:
View Answer
Correct answer: A — pytest.skip()
- NUnit supports parameterized tests with multiple values using:
View Answer
Correct answer: A — [Values]
- Which of the following best describes advanced unit testing?
View Answer
Correct answer: A — Using parameterized tests, fixtures, and lifecycle methods