cancel
Showing results for 
Search instead for 
Did you mean: 

ReadyAPI - Organize test steps into blocks ?

SOLVED
Contributor

ReadyAPI - Organize test steps into blocks ?

Logically speaking, tests (api, ui etc) often have the following 3 "steps" or sections:

1 - Arrange - Create the test data/prerequisite conditions for testing.
2 - Act - Perform an action.
3 - Assert - Test if the action produces the expected result.

It is easy to show & demarcate these sections in code with heading comments or newlines between the sections. How can I show the same sections in ReadyAPI?

I have many tests which begin with 3-5 Run Test Case test-steps before the actual testing begins. These test-steps are actually setting up test data. Additionally, some tests have more than 1 test-step for validation instead of only 1. So, when such tests fail, it is hard to know which section of the test is responsible (test data, api call or assertions). Moreover, when I read such a test, it is often hard to figure out where the actual testing begins.


Keywords - Arrange Act Assert, Organizing test steps.

1 ACCEPTED SOLUTION

Accepted Solutions
Contributor

Re: ReadyAPI - Organize test steps into blocks ?

i that sounds like a feature request.  In fact, you could take that request one step further and suggest re-usable test blocks, which contain commonly used set of steps.

View solution in original post

4 REPLIES 4
Community Leader

Re: ReadyAPI - Organize test steps into blocks ?

Hi,

I tend to use a Delay Test Step to achieve this.  Create a Delay Test step, rename it to whatever and set the delay value to 0.

Not a perfect solution, but workable.

 

Contributor

Re: ReadyAPI - Organize test steps into blocks ?

Thanks for the idea. I guess one could name the delay as Comment - Test data creation follows or such. But, its not an ideal solution as you mentioned.

PS - I wish ReadyAPI had blocks which would be like a rectangle around test steps. Blocks would have a drop down arrow which could store comments. Alternately, we could have a "test step" which only provides a comment box that can be logged if needed.

Contributor

Re: ReadyAPI - Organize test steps into blocks ?

i that sounds like a feature request.  In fact, you could take that request one step further and suggest re-usable test blocks, which contain commonly used set of steps.

View solution in original post

Contributor

Re: ReadyAPI - Organize test steps into blocks ?

Hi, that sounds like functions in programming. Although ReadyAPI does not have functions like that, you can use tests as functions also to work around that limitation. Create a suite with tests which have the functionality you need and then disable the suite. The "function" tests in that suite can accept parameters and can be called by other tests as needed.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors