Question 1. What Is A Test Framework?
In general, a framework is an entity which binds several modules in a logical sequence to cover the end-to-end flows of an application. The objective of investing into a framework is to test a product which has a recurring roadmap and regular release cycle.
Question 2. What Are The Apparent Advantages Of A Test Framework?
Following are the possible benefits of using a test framework.
- It reduces the complexity of using a variety of technologies inculcated in a product.
- It organizes the unit and functional testing efforts of a developer and tester.
- Provides early feedback on the quality of the code.
- Helps in tracking test coverage as well as code coverage.
- Results in easy debugging and reduces chances of errors.
Question 3. What Type Of Tests Selenium Can Run?
- You can use Selenium for the functional, regression, and load testing of the web-based applications.
- You can employ this tool for doing the post-release validation.
- Integrate it with the continuous integration tools like Jenkins, Hudson, QuickBuild or CruiseControl.
The above two questions were a little basic which sometimes we miss explaining during the interview. So, we thought it was worth starting with them.
Question 4. What Are The Prereqs For Building A Selenium Cucumber Automation Framework?
You might like to consider the following facts while creating a productive and scalable test framework.
- Identify the type of application you are going to test. Is it a Web app, support mobile devices or runs on a desktop.
- Would it require backend testing? e.g. Databases or SDK.
- Decide on the input format. Is it static or dynamic?
- Do you need to test the app for internationalization?
- It must have a report which can help you trace a failure with minimum efforts.
- It must support auto-generation of parametrization tests.
- Have a config file to define any setup related settings or the global properties.
- Apply abstraction at every level to separate the functionality.
Question 5. List Down The Advantages Of Using Selenium As A Testing Tool?
- It’s an open source, so you save a lot on the cost side.
- It gives you options to choose from a list of programming languages. e.g. Java, Python, C-Sharp, Ruby, and Python.
- It offers easy and powerful dom-level testing.
- You can use it in either of Agile or waterfall environment.
- Easy integration with Jenkins, Bamboo, and some other notable CI tools.
Question 6. List Down The Mobile Device Which Selenium Supports?
- It supports Safari browser via a third-party driver. It is experimental and comes with limited functionality.
- It provides an Android driver to run tests on its native mobile browser.
Question 7. Are There Any Readymade Selenium-cucumber Frameworks Available?
Yes, there are a few we are listing down below. Though, we recommend building one of your own as it gives you more freedom.
- Selenium-Cucumber framework for testing the web and android apps.
- Another one is an acceptance testing framework using Cucumber and Selenium Webdriver.
Question 8. What Does A Feature File Contain?
A feature file in cucumber specifies parameters and conditions for executing the test code. It can combine any of the following.
- A feature.
- A user scenario.
- The scenario outline.
Question 9. What Is A Profile In Cucumber?
You can create Cucumber profiles to run a set of features and step definitions. Use the following command to execute a cucumber profile.
cucumber features -p
#Example: cucumber features -p acceptance
Question 10. What Are Before, After, Beforestep And Afterstep Hooks?
- Before: executes before the feature file execution.
- After: executes after the feature file execution.
- BeforeStep: executes before the each step execution.
- AfterStep: executes after the each step execution.
Question 11. What Are Cucumber Tags? And Why Do We Use Them?
Cucumber tags help in filtering the scenarios. We can tag the scenarios and then run them based on tags.
- We can add tags to scenarios with <@> symbol.
- We can use the following command to run a cucumber tagged scenario.
cucumber features -t @
Example: cucumber features -t @test
Question 12. What Is The Purpose Of Cucumber Dry-run?
We use to compile the cucumber feature files and step definitions. If there occur any compilation errors, then it shows them on the console.
Question 13. List Out Some Of The Main Differences Between Jbehave And Cucumber?
However, the Cucumber and Jbehave share the same perspective, but there are few key differences.
- Jbehave is Java-based and Cucumber is Ruby-based.
- Jbehave is story-driven whereas the Cucumber is feature-driven.
Question 14. What If You Don’t Use The Cucumber Keywords In Test Steps?
Please note that it’s not mandatory to write keywords in test steps.
For example, we can build a test step like the one shown in the next line.
e.g.- We are testing using cucumber.
Question 15. When Would You Use Rspec And When To Use Cucumber?
- RSpec is more successful in doing unit testing.
- As you know that Cucumber is a behaviour-driven development tool. So you can use it for System and Integration testing.
Question 16. What Are The Steps To Generate A Report In Cucumber?
We run the following command to produce HTML reports.
.feature –format html –out report.html –format pretty
Question 17. What Is The Right Way To Execute A Specific Scenario From The Feature File?
We can select the target scenario from a feature file by providing its line number.
cucumber features/test.feature:10 –format html > testfeature.html
WinRunner Interview Questions
Adv Java Interview Questions
Adv Java Tutorial
Selenium Interview Questions
Web Developer Guide Interview Questions
Automation Testing Interview Questions
WinRunner Interview Questions
Web Developer Guide Tutorial
Software testing Interview Questions
Software testing Tutorial
JUnit Interview Questions