Last Updated On
Are you familiar with Cucumber and want to test your understanding? This post contains 25 useful Cucumber multiple-choice questions (quiz) to self-test your knowledge of Cucumber.
You can find the questions for the below-mentioned answers in this post –
Cucumber Quiz: 25 Multiple-Choice Questions with Answers – MCQ2
Answers
1) 4) All of the above
2) 1) Gherkin
3) 3) A table of input parameters
4) 2) Scenario Outline: Login with invalid credentials
5) 2) dryRun
6) 4) –glue
7) 2) –strict
8) 1) mvn test -Dcucumber.filter.tags=”@regression”
9) 1) mvn test -Dcucumber.features=”src/test/resources/features/Login.feature”
10) 3) mvn test -Dcucumber.glue=”com.example.stepdefinitions”
11) 1) mvn test -Dcucumber.plugin=”html:target/cucumber-reports/cucumberReport.html”
12) 1) True
13) 1) True
14) 2) Feature
15) 1)
mvn test -Dcucumber.features="src/test/resources/LoginPage.feature" -Dcucumber.filter.tags="@ValidCredentials"
16) 1) @CucumberOptions
17) 3)
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty"})
public class RunCucumberTest {
}
18) 1) Yes
19) 1) monochrome=true
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(monochrome=true)
public class RunCucumberTest {
}
20) 4) Run the scenario tagged with both smoke and regression
21) 4) All of the above
22) 1) Yes
23) 1) Yes
24) 1) Yes
25) 1) Yes. It is the Test Runner using TestNG.
You may have to change answer for 23 or update the options.
LikeLike
Thank You. I have updated the option number
LikeLike