robotframeworktest-8

HOW TO CREATE ROBOT FRAMEWORK COMPATIBLE TEST CASES

Spread the love

ROBOT FRAMEWORK which is a generic test automation framework for acceptance testing and its tabular test data syntax is almost plain English and easy to understand. Its testing capabilities can be extended by test libraries implemented either with Python or Java, and users can create new higher-level keywords from existing ones using the same syntax that is used for creating test cases. Robot Framework itself is open source and most of the libraries and tools in the ecosystem are also open source.Robot Framework comes from its user keyword feature: in addition to the keywords provided by the extension libraries, users can create new higher-level keywords from the existing ones using the same syntax that is used for creating test cases. And, of course, everything can be parametrized with variables.Test cases are always executed within a test suite. A test suite created from a test case file has tests directly, whereas suites created from directories have child test suites which either have tests or their own child suites.

Test Cases

Test Steps:
  • Launch Browse
  • Search Application On Google
  • Launch Application
Now let’s give structure to our above Test Case as per Robot Framework.Execution flowEverything in RF is given in the form of 4 tables which are called as “Setting”,”Variables”,”Test Cases” and “Keywords” table.Settings: - It’s equivalent to global dependencies like if we talk about Java language it’s like import statement written before coding begins or like stdio. h header in C language. It contains the settings like a link to resources file, variable file, external libraries.Variables: - As the name indicates it contains our declaration of variables used in the flow of RF say like URL = www.google.comTest Cases:- It is where we are going to define our manual test case flow in the business like language thus it easily understood by nontechnical team members.Keyword:- This is the place where real actions happen, meaning we give implementation to our above-defined test case like we say “Launch Browser” in our test cases table, then how RF know that its suppose to launch the browser. For that, we need to define the meaning of “Launch Browser” in our keywords table. Generally, we use pre-defined keywords from our external

Step by test cases

Step1:-
  • Open the editor and create the 4 tables preceded with an asterisk (*) symbol, this is internally used by RF to distinguish the tables as anything outside these tables is redundant for RF.
  • Put one space and then add the name of the table, Say *** Settings ***
Picture1Note:- 
  • For consistency purposes it is advisable to use 3, *** symbols in front of table name (as same would be created in RIDE).We can use * or ** or *** as all are same for RF. So don’t be confused lets have 3 *** symbols. ‘*’ at the end is not required, but again for consistency purposed we are implementing them.
Step2:-Copy the business steps of manual test case above and add to “Test Cases” table picture-2Note:-
  • First row of the Test Cases table is used for Test Case name say for documentation.
Step3:-Define the required variables in Variables table. Each variable is defined as ${variable name} picture3Step4:- Add the required libraries in “Settings” table, we would be using Selenium2Library as we would be working with browser application thus we need the keywords defined in this library. picture-4Step5:-Main step to define the meaning of Keywords used in the Test Cases table. We would utilize the predefined keywords of “Selenium2Library”. picture-5Step6:-Save the file with .robot extension (it is same as .txt).Note:- 
  • RF supports the .html format, TSV format, Plain text and restructured Text formats. In our example, we have used plain text format which is widely implemented across the industry.
  • For identifying the locator properties of the object above, you can use firebug, or simply use selenium -IDE, record a script and extract properties.
Step7:-Run the file using “pybot” interpreter. Write the command pybot testcaseName.robot on command prompt and we are ready with results. Picture6 Note:- Don’t worry in case the code is not running in the first go, there can be issues like spell mistakes or extra spaces, just copy the above code, save and execute it.  

What OdiTek offers


Refer our Skills page:

Robot Framework

Robot Framework is a keyword-driven test automation framework, written in Python. It empowers testers to automate and manage complex workflow scripts efficiently. It utilizes the keyword-driven testing approach & it has easy-to-use tabular test data syntax. Keyword-driven/Table-driven testing Keyword-driven testing or some call it table-driven testing are the...

more

Client Testimonials

We had a tough deadline to launch our .Net based application that processes a lot of data, and got very frustrated with our development agency we hired. Fortunately we got Oditek, and they took over seamlessly the product development, launched the app & continued feature development. Just awesome!

Neal Bonrud

Co-Founder – SubScreener, USA

They were very attentive to our needs as clients and went out of the way to make sure our projects were taken care of. They were always able to get projects done in the specifications we requested. They are passionate about getting things done; I would definitely recommend them to lead any IT projects.

Dann Manahan

Sr VP Technology- 1031 Crowd Funding

I worked with OdiTek on few high profile banking application projects. They did a fantastic job with web applications & manual testing on the VAS apps for two leading banks of UK that included rigorous UAT phases. I recommend them for any application development where security matters.

Clive Shirley

CTO- Smarta, UK

OdiTek is our extended team who works on our key software projects. They are dependable, good in collaboration and technically very much to the level what we expect a global team should be. They had transformed our web applications, CRM and added mobility to existing business platforms here.

Matt Berry

IT Manager- First Option Online

It's been more than 4 years now that we are working with OdiTek on our cloud based web product development. It's been amazing working together, they are very competent on designing scalable, high performance apps. Their technical support is outstanding to say the least, even at odd hours.

Brad Taylor

CEO- BluesummitTech, USA

I am a fan of Team OdiTek since 2014 and have worked on many product development projects together. Specially worth mentioning their deliveries on VAS Banking web application development & manual testing services for Smarta, UK. They are highly skilled & a professional team to work with.

Tom Bowden

Digital Propositions - HSBC, London

OdiTek has been working on our Integrated Web-scale Mobile Platform i.e. Optimal Health since 2014. They are very professional and takes care of the requirements meticulously. They are technically very sound and sincere in ensuring quality & performance. Wonderful working with them!

Catherine Lim

COO- Medilink Global Sdn Bdh

You can trust the team, with minimum supervision you get the work done. They are honest, professional & committed to schedule & quality. I had been successfully running 3 business applications designed, developed and maintained by Oditek developers. It’s been a pleasure working with them.

Scott Evans

CEO- Pink Storage, UK

OdiTek has been working in custom software development, including services for test automation. Many of them have worked with me in 2009-10 when I was R&D Manager in NetHawk India. They have great enthusiasm & a passion to excel in bringing customer success. Their work has been very impressive.

Karen Hamber

Senior Product Manager- Skype

It's amazing to see these guys are turning their experience into a global delivery excellence at OdiTek. I am sure their past large scale product development experience will be handy to product companies. I would always recommend Oditek for software development, especially performance-driven solutions.

Juha Marjeta

Opti Automation Oyj

If you need additional information or have project requirements, kindly drop an email to: info@oditeksolutions.com

×