Cucumber supports over the dozens of software languages over the software platform like:
- Ruby on rails
- Pico container
- Spring framework
What are the advantages of Cucumber over other tools?
Advantages of cucumber over the other tools are:
- Cucumber supports different languages like Java.net, Ruby.
- It acts as a bridge between the business and technical language, we can accomplish by creating a test case in plain English test.
- It allows the test script to be written without knowledge of any code; it allows the involvement of non-programmers as well.
- It serves the purpose of end-end test frame work unlike other tools. Because of its simple test script architecture, cucumber provides code reusability.
How to execute a Ruby script?
- To Execute A Ruby ScriptWrite the script in notepad and run in command prompt by typing ruby runbydemo.rb
This is to check whether the ruby engine is working or not.
- Download notepad++ from Google to type the scrip to do the automation testing for login details.
- Using the class in the watir which is a collection or library which consists of many classes which helps in the automation testing.
- Write the case to check the application website under test by creating an object.
- We write the comment by using # symbol.
- In first line we are creating the object FFBrowser(Firefox browser) from Watir library. Include the watir webdriver by require command.
- In second line we are checking the application under test that is it should goto proper website.
- Save the file by the name filename.Rb extension to identify its an ruby program.
- Goto command prompt open ruby folder then run the file by giving the command ruby filename.rb