Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Online Gherkin Test

Topics Covered

  • Assertion
  • Eclipse integration
  • Execution
  • Reporting
  • Cucumber tags
  • Exception
  • Parameterization

Useful for hiring

  • QA Engineer
  • Automation Test Lead - Gherkin
  • Gherkin Test Engineer
  • Automation Tester- Gherkin/Cucumber

Start hiring job-fit candidates using this assessment

GET A DEMO

"We realized that to acquire quality talent, our recruitment process was in dire need of automation. Too many of our technicalteam were simply wasting hours conducting interviews that did not yield the desired results. For us the foremost criteria were to finda recruitment partner who could tick all the right boxes"

Rehana Nisar, Gartner,
Global Product & Services Recruitment Head
Question

You have a Cucumber project, and you are using Chai as Assertion library. Which of the following is a valid assertion code snippet using Chai with Cucumber?

Answer
    • import static org.junit.Assert.*;
      public class Example {
      @Then("^the result should be (.+)$")
      public void the_result_should_be(String expectedResult) {
      assertEquals(expectedResult, result);
          }
      }
       

    • Given /^a nice new bike$/ do
      expect(bike).to be_shiny
      end
       

    • const assert = require('assert')
      Then('the result should be {word}', function (expected) {
      // this.actual is typically set in a previous step
      assert.equal(this.actual, expected)
      })
       

    • const expect = require('chai')
      Then('the result should be {word}', function (expected) { expect(this.actual).to.eql(expected)
      })
       

Question

You have a Feature file, and it has many scenarios in it. But you want to create Output report using Command Line. What is the valid way to do this?

Answer
    • Go to the project location using cmd. Then give the command of the type mvn test -Dcucumber.options=”-plugin junit:target/cucumber-reports/report.xml”

    • You need to add the dependency for the default Reporting in the pom.xml file. Then just run the project from Command line. It will generate the report for you.
       

    • Go to the project location using cmd. Then give the command of the type mvn test ”-plugin junit:target/cucumber-reports/report.xml”

       

    • None of the mentioned
       

Question

You have a Feature file and it has many scenarios in it. But you want to run only a particular scenario based on its tag name using Command Line. What is the valid way to that?

Answer
    • 1) Go to the project location using cmd. Then give the command of the type mvn test -Dcucumber.options=”@tag Name” 
       

    • 2) Go to the project location using cmd. Then give the command of the type mvn test -Dcucumber.options=”feature file path” + “line number of the tag” 
       

    • 3) Go to the project location using cmd. Then give the command of the type mvn test -Dcucumber.options=”–tags @tag Name”

    • Either of 1 and 2

Test details:

Gherkin skills test will evaluate candidate's practical knowledge and will identify whether the candidate is ready to be employed. Gherkin assessment test can be taken by candidates from anywhere in the comfort of their time zone.

Gherkin pre-employment test may contain MCQ's (Multiple Choice Questions), MAQ's (Multiple Answer Questions), Fill in the Blank, Descriptive, Whiteboard Questions, Audio / Video Questions, True or False.


Test Duration: 20 minutes

10 Application Questions

Test description:

Gherkin is a type of format for cucumber specifications. It is mainly a domain specific language which helps you to describe business behaviour without the need to go into detail of implementation. Gherkin mostly uses a set of special keywords to give structure and meaning to executable specifications. 
 
Online Gherkin test helps technical recruiters and hiring managers to assess candidate’s ability to work on Gherkin. Gherkin online test is created & validated by experienced industry experts to assess & hire Gherkin automation Engineer as per the industry standards.
 
Gherkin assessment test helps to screen the candidates who possess traits as follows: 

1.  Ability to design and write maintainable automated test scripts using Cucumber/Gherkin
2.  Strong experience in writing Gherkin scenarios for test automation
3.  Excellent knowledge of BDD technology stack - Gherkin, Cucumber
4.  Familiarity with concepts like eclipse integration, execution, reporting Cucumber tags
 
Interview Mocha’s powerful reporting & intelligent analytics will help you overview candidate’s performance in each section within a glance. Candidate feedback module will ensure candidates are having excellent experience with Interview Mocha.

Gherkin online test is designed with consideration of EEOC guidelines for candidate assessment. It will help recruiters to assess and hire diverse talent without any bias.

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO