Applications Under Test (AUT)

Before we start designing automated test cases, let's take a look at the application or system under test and the data under test as well. I am using a local MongoDB database, where I have created a Collection to store Customer Data. At this time of this post, there was just over 100 customer records in the MongoDb Collection for us to work with


MongoDb Customer Collection

This Customer record collection is the result of my ETL data pipeline that pulls data from my salesforce instance, onprem sql server, and SAP.

    "quoteId": "1987697556",
    "paidStatus": "PAID",
    "yearlyAmount": "1450",
    "email": "",
    "contact_sfdcId": "0031U00001pMARBCD",
    "account_sfdcId": "0011U00009yHETFGH",
    "opp_sfdcId": "0061U000998845DDDD",
    "firstName": "Billy",
    "lastName": "Davidson",
    "phone": "3055551256",
    "address": "560 Ocean Drive",
    "city": "Miami",
    "zip": "30500"

Swagger file for .NET 6 API CRUD operations

Swagger for .NET 6 API CRUD

Which test cases will we automate with Tosca?

  • GetListofCustomers
  • GetCustomerByQuoteId
  • GetCustomerBySalesforceAccountId
  • CreateNewCustomer

Steps to Create Automated API Test Cases in Tosca

Scan Swagger File

Scan the swagger file into Tosca API Scan to build the list of test casesTosca API Request ResponseAdd data to the request and click run. The response back


from the API is captured and displayed in the Response Tab.

Tosca API MongoDB Test CasesTosca creates modules and the test cases for you