How to integrate ReadyAPI with Zephyr Scale

ReadyAPI has inbuilt support for various test management tools. File » Preferences will list down all integration with tools like Jira, Zephyr etc. However, at the time of writing this post, Zephyr Integration is available only with Zephyr Squad and not Zephyr Scale. If your team is using Zephyr Scale, there is no inbuilt integration. I hope this will change in future since both ReadyAPI and Zephyr Scale is owned by same company. ...

March 29, 2022

ReadyAPI_How to use Script Assertions

In the previous blog post here and here, we saw how to create a functional test case and add assertions to validate the result. ReadyAPI provides many inbuilt assertion methods which will help to easily validate the output response without any coding. However, in real-world usage for test automation, it may not be enough. Consider the scenario where we need to validate the response content has proper values from an expected list. In this example, let us make an assertion to validate, that the status field in the response for making the order is either placed or notplaced. ...

March 10, 2022

How to work with XML in groovy Scripts

ReadyAPI can be used for testing both SOAP and REST services. Output format of them is mainly XML / JSON. Hence it is important to know how to parse them into corresponding objects. Parsing XML Consider a scenario where output for a SOAP service or JDBC call is returning a XML containing list of person information, which we need to convert to objects. XML format is like below, which available as a response content of a ReadyAPI Step ...

February 24, 2022

How to make full use of readyAPI features

In my previous post here, I mentioned how to do a basic functional test. Sometimes, we might have to do complex flows where we need to call multiple APIs and also iterate the tests with various sets of data. Let us look at one scenario, which involves the below steps. Get details of pet based on PetID If the pet details are retrieved, place an order Iterate the above scenario for different Pet ID ...

February 1, 2022

Getting Started with ReadyAPI

Ready API is the rebranded SOAPUI Pro, which can be used for testing both SOAP services and REST services. This is a licensed tool , which offer 14 days free trial for all features. ReadyAPI provides lot for upgrades compared to free open source SoapUI . Major advantages to support functional testing of REST APIs are dynamic data sources, assertion groups, scripting , advanced property transfer etc. Full list of differences between ReadyAPI and Soap UI can be found here . ...

January 19, 2022

Dynamically create instance of a type on run time using Reflection in C#

Reflection is the process of describing the metadata of types, methods and fields in a code. It helps to get information about loaded assemblies and elements within it like classes, methods etc. According to microsoft documentation, Reflection provides objects (of type Type) that describe assemblies, modules, and types. You can use reflection to dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object and invoke its methods or access its fields and properties. If you are using attributes in your code, reflection enables you to access them. ...

July 31, 2021

Data driven testing in Cypress using Fixtures

In the previous post here we saw how to read external files in Cypress using cy.readFile. Cypress also provides another way to read files. In this post, I will show how to Fixtures to do data driven testing in Cypress. ####Syntax#### According to documentation, syntax is as below. cy.fixture(filePath) cy.fixture(filePath, encoding) cy.fixture(filePath, options) cy.fixture(filePath, encoding, options) ####Comparison with cy.readFile#### Main difference between cy.readFile and cy.Fixture is that former one starts looking for the files from project root folder and later looks for files under Fixture folder. cy.Fixture supports a wide range of file types/extensions like json, txt, html,jpeg,gif,png etc. If file name is not specified it looks for all supported filetypes in specific order starting with JSON. We can even assign alias to this , which will help to reuse this later on. ...

December 19, 2020

Reading external files in Cypress using readFile

In the previous post here and here, we saw how to write BDD test cases using cucumber along with Cypress and to use datatables. As we saw in those examples, we are hard coding few data in feature files. This is not a best practise since we need to modify the feature file for every new set of data. Assuming we need to have different data in different environments, this will make it hard to run the tests across various test environment. Let us look at how we can make read these data from a file outside of feature file. ...

December 19, 2020

Reading Configuration Values in Dotnet core using Options Pattern

Normally every project will have some values to be read from config files like user name, connection strings, environment specific details etc. Dotnet Framework In dotnet framework projects, this can be easily done by using Configuration Manager. This is available when we add System.Configuration assembly reference. Let us look at an example of a app config file like below <?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup> <appSettings> <add key="Url" value="https://www.saucedemo.com/"/> <add key="UserName" value="standard_user"/> <add key="Password" value="secret_sauce"/> </appSettings> </configuration> Storing user name and password in app config is not a best practise. For sake of simplicity , let us keep it here. In dotnet framework , we can read above config values with below ...

December 17, 2020

Using Datatable in Cypress Cucumber

In the previous post here, we saw how to use cucumber along with Cypress. The demo scenario we saw was a basic example. Now let us look into how we can use datartable in cypress cucumber. ##Feature File## Feature: Demo for BDD in Cypress I want to demo using BDD in Cypress @focus Scenario: Logging into ECommerce Site Given I open Demo shopping page When I login as 'standard_user' user Then I should see products listed Given I add below products to cart |ProductName |Qty| |Sauce Labs Backpack |1 | |Sauce Labs Fleece Jacket |1 | |Sauce Labs Onesie |1 | The step definition file will be as below ...

December 11, 2020