cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing is caring - ReadyApi libraries

Highlighted
Community Hero

Sharing is caring - ReadyApi libraries

1.Reasoning

 

Although not very well documented, ReadyApi gives users the possibility to use libraries (-ish). Those are very handy when you have similar steps that are repeating over multiple test cases and they serve at least 3 basic purposes:

  • less duplicate steps in your project
  • more clear project structure given by the reduction of test steps in a test case
  • ease in updating the project if something is to change at some point (because only the libary has to be edited - and not every test steps in particular where they are used)

 

2.Libraries in ReadyApi

 

Libraries in ReadyApi are just test cases which are run from another test case or test suite. Take this example:

2017-08-28_09h55_13.png

 

In each step we want to first navigate to some Details Section in a website and then check for name, ocupation etc. You can see in the picture above that the Steps in blue quadrants are repeating themselves over and over again which is something usually undesirable.

 

A cleaner way to do it would be to create a Libraries test suite to hold any steps that are repeating in multiple places and/or are subject to future changes. In our case we would have a OpenDetailsSection test case:

2017-09-08_14h17_57.png

 

Then we would simply make use of the 'Run TestCase' test step to run the OpenDetailsSection test case:

2017-09-19_10h13_40.png

 



If my answer helped please click on the 'Accept as Solution' button.
2 REPLIES 2
Highlighted
Moderator

Re: Sharing is caring - ReadyApi libraries

Thanks for sharing, @Lucian.

You help us build a good TechCorner section Smiley Happy


Olga Terentieva
SmartBear Assistant Community Manager

Highlighted
Community Hero

Re: Sharing is caring - ReadyApi libraries

Sure, hope it helps!



If my answer helped please click on the 'Accept as Solution' button.
New Here?
Join us and watch the welcome video:
Announcements