idaithalam.1.3.11.source-code.virtualan-contract.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of idaithalam Show documentation
Show all versions of idaithalam Show documentation
Idaithalam is a low code Test automation Framework, developed using Java and Cucumber. It leverages Behavior Driven Development (BDD). Tester can create test cases/scripts in simple Excel with API Spec. Excel is a simplified way to create Json based test scripts in Idaithalam. Test cases can be created quickly and tested in minutes.
As a tester, you need to create Excel and pass it to Idaithalam Framework.
First, generate the Json based test scripts(Virtualan Collection) from Excel. During test execution, this test script collection can be directly utilized.
Then it generates Feature files from the Virtualan Collection and its executed.
Lastly, It generates test report in BDD/Cucumber style.
This provide complete testing support for REST APIs, GraphQL, RDBMS DB and Kafka Event messages
#idaithalam #apitesting #testautomation #restapitesting #insprintautomation #rdbmstesting #graphqltesting #kafkamessagetesting #eventvalidation #messagevalidation #cucumber #bdd
Virtualan Collection is a JSON based TestScripts generated from Excel
API testing can be automated using Excel, POSTMAN collection and VIRTUALAN
- Utilized for API testing.
- Utilized Contract testing.
- Utilized Production Checkout.
- Agile Testing - Progressive Regression can be done for each sprint. Reduce lot of manual effects.
Feature: {{feature}}
Scenario: Load initial set of data
Given Provided all the feature level parameters from file
{{#items}}
{{#okta}}
@{{{resource}}}
Scenario: Read the API token for {{{resource}}}
Given a user perform a api action
And basic authentication with [okta_user_id.{{{resource}}}] and [okta_user_password.{{{resource}}}]
When a user post application/json in api_token resource on okta_token.{{{resource}}}
Then Verify the status code is 200
And Store the access_token value of the key as AccessToken.{{{resource}}}
{{/okta}}
{{/items}}
{{#items}}
{{#isRest}}
{{#tags}}
{{{tags}}} @{{{resource}}}{{#skipScenario}} @skip{{/skipScenario}}
{{/tags}}
{{^tags}}
@{{{resource}}}{{#skipScenario}} @skip{{/skipScenario}}
{{/tags}}
Scenario: {{scenario}} - {{method}} api call
{{/isRest}}
{{#isKafka}}
{{#kafkaInput}}
{{#tags}}
{{{tags}}} @{{{resource}}}{{#skipScenario}} @skip{{/skipScenario}}
{{/tags}}
{{^tags}}
@{{{resource}}}{{#skipScenario}} @skip{{/skipScenario}}
{{/tags}}
Scenario: {{scenario}} - {{method}} kafka message
Given As a user perform message {{scenario}} action
{{#hasInputJsonMap}}
When Send mapson message {{stepInfo}} for event {{event}} on {{resource}} with type {{messageType}}
{{#inputJsonMap}}
| {{{key}}} | {{{value}}} |
{{/inputJsonMap}}
{{/hasInputJsonMap}}
{{#hasInputInline}}
When Send inline message {{stepInfo}} for event {{event}} on {{resource}} with type {{messageType}}
{{#inputInline}}
| {{{.}}} |
{{/inputInline}}
{{/hasInputInline}}
{{/kafkaInput}}
{{/isKafka}}
{{#isDatabase}}
{{#dbInput}}
{{#tags}}
{{{tags}}} @{{{resource}}}{{#skipScenario}} @skip{{/skipScenario}}
{{/tags}}
{{^tags}}
@{{{resource}}}{{#skipScenario}} @skip{{/skipScenario}}
{{/tags}}
Scenario: {{scenario}} - database action
Given As a user perform sql {{stepInfo}} action
When Execute {{method}} for the given sql {{stepInfo}} on {{resource}}
{{#inputInline}}
| {{{.}}} |
{{/inputInline}}
{{/dbInput}}
{{/isDatabase}}
{{#isRest}}
Given a user perform a api action
{{#hasCreateParams}}
{{#createParams}}
And Add the {{{value}}} value of the key as {{{key}}}
{{/createParams}}
{{/hasCreateParams}}
{{#skipScenario}}
And perform the {{{skipScenario}}} condition to skip scenario
{{/skipScenario}}
{{#okta}}
And Bearer auth with [AccessToken.{{{resource}}}] token
{{/okta}}
{{#basicAuth}}
And basic authentication with [basic_auth_user_id.{{{resource}}}] and [basic_auth_password.{{{resource}}}]
{{/basicAuth}}
{{#hasFormParams}}
And add request with {{contentType}} given form params
{{#formParams}}
| {{{key}}} | {{{value}}} |
{{/formParams}}
{{/hasFormParams}}
{{#hasPathParams}}
And add request with given path params
{{#pathParams}}
| {{{key}}} | {{{value}}} |
{{/pathParams}}
{{/hasPathParams}}
{{#hasQueryParams}}
And add request with given query params
{{#queryParams}}
| {{{key}}} | {{{value}}} |
{{/queryParams}}
{{/hasQueryParams}}
{{#hasHeaderParams}}
And add request with given header params
{{#headerParams}}
| {{{key}}} | {{{value}}} |
{{/headerParams}}
{{/hasHeaderParams}}
{{#hasCookieParams}}
And add request with given cookie params
{{#cookieParams}}
| {{{key}}} | {{{value}}} |
{{/cookieParams}}
{{/hasCookieParams}}
{{#inputFile}}
And add {{{inputFile}}} data file with {{contentType}} given input
{{/inputFile}}
{{#hasInputInline}}
And add request data inline with {{contentType}} given input
{{#inputInline}}
| {{{.}}} |
{{/inputInline}}
{{/hasInputInline}}
{{#stdInput}}
And add {{stdInput}} data with {{contentType}} given input
{{/stdInput}}
{{#hasInputJsonMap}}
{{#isPost}}
And Create api with given input
{{/isPost}}
{{#isPut}}
And Update api with given input
{{/isPut}}
{{#isPatch}}
And Update api with given input
{{/isPatch}}
{{#inputJsonMap}}
| {{{key}}} | {{{value}}} |
{{/inputJsonMap}}
{{/hasInputJsonMap}}
When a user {{action}} {{contentType}} in {{url}} resource on {{resource}}
Then Verify the status code is {{httpStatusCode}}
{{#noSkipOutput}}
{{#hasCsvson}}
And Verify {{csvsonPath}} response csvson includes in the response
{{#csvson}}
| {{{.}}} |
{{/csvson}}
{{/hasCsvson}}
{{#stdType}}
{{#outputFile}}
And Verify-standard {{stdType}} all {{{outputFile}}} file {{url}} api includes following in the response
{{/outputFile}}
{{#hasOutputInline}}
And Verify-standard {{stdType}} all inline {{url}} api includes following in the response
{{#outputInline}}
| {{{.}}} |
{{/outputInline}}
{{/hasOutputInline}}
{{/stdType}}
{{^stdType}}
{{#hasResponseByField}}
And Verify across response includes following in the response
{{#responseByField}}
| {{{key}}} | {{{value}}} |
{{/responseByField}}
{{/hasResponseByField}}
{{#hasOutputFileByPath}}
And Verify {{resource}} response {{contentType}} include byPath {{{outputFile}}} includes in the response
{{#outputFileByPath}}
| {{{.}}} |
{{/outputFileByPath}}
{{/hasOutputFileByPath}}
{{^hasOutputFileByPath}}
{{#outputFile}}
And Verify api response XML File {{{outputFile}}} includes in the response
{{/outputFile}}
{{/hasOutputFileByPath}}
{{#hasOutputInline}}
And Verify api response inline includes in the response
{{#outputInline}}
| {{{.}}} |
{{/outputInline}}
{{/hasOutputInline}}
{{#stdOutput}}
And Verify api response with {{stdOutput}} includes in the response
{{/stdOutput}}
{{#hasOutputJsonMap}}
And Verify-all {{url}} api includes following in the response
{{#outputJsonMap}}
| {{{key}}} | {{{value}}} |
{{/outputJsonMap}}
{{/hasOutputJsonMap}}
{{/stdType}}
{{/noSkipOutput}}
{{#hasStorageParams}}
{{#storageParams}}
And Store the {{{value}}} value of the key as {{{key}}}
{{/storageParams}}
{{/hasStorageParams}}
{{#hasEvaluateParams}}
{{#evaluateParams}}
{{#isString}}
And evaluate the {{{value}}} function value of the key as {{{key}}}
{{/isString}}
{{#isInteger}}
And evaluate the {{{value}}} integer value of the key as {{{key}}}
{{/isInteger}}
{{#isDecimal}}
And evaluate the {{{value}}} decimal value of the key as {{{key}}}
{{/isDecimal}}
{{#isBoolean}}
And evaluate the {{{value}}} boolean value of the key as {{{key}}}
{{/isBoolean}}
{{#isCondition}}
And evaluate the {{{value}}} condition {{{key}}}
{{/isCondition}}
{{/evaluateParams}}
{{/hasEvaluateParams}}
{{/isRest}}
{{#isKafka}}
{{#kafkaOutput}}
{{#hasResponseByField}}
{{#kafkaInput}}
Then Verify-by-elements {{stepInfo}} for event {{event}} contains {{identifier}} on {{resource}} with type {{messageType}}
{{/kafkaInput}}
{{^kafkaInput}}
And Verify-by-elements {{stepInfo}} for event {{event}} contains {{identifier}} on {{resource}} with type {{messageType}}
{{/kafkaInput}}
{{#responseByField}}
| {{{key}}} | {{{value}}} |
{{/responseByField}}
{{/hasResponseByField}}
{{#hasCsvson}}
{{#kafkaInput}}
Then Verify {{stepInfo}} for event {{event}} contains {{identifier}} on {{resource}} with type {{messageType}}
{{/kafkaInput}}
{{^kafkaInput}}
And Verify {{stepInfo}} for event {{event}} contains {{identifier}} on {{resource}} with type {{messageType}}
{{/kafkaInput}}
{{#csvson}}
| {{{.}}} |
{{/csvson}}
{{/hasCsvson}}
{{/kafkaOutput}}
{{/isKafka}}
{{#isDatabase}}
{{#dbOutput}}
{{#hasCsvson}}
{{#dbInput}}
Then Verify details with the given sql {{stepInfo}} on {{resource}}
{{/dbInput}}
{{^dbInput}}
And Verify details with the given sql {{stepInfo}} on {{resource}}
{{/dbInput}}
{{#csvson}}
| {{{.}}} |
{{/csvson}}
{{/hasCsvson}}
{{/dbOutput}}
{{#hasStorageParams}}
{{#storageParams}}
And Store-sql's {{{value}}} value of the key as {{{key}}}
{{/storageParams}}
{{/hasStorageParams}}
{{/isDatabase}}
{{#hasMultiRun}}
Examples:
{{#multiRun}}
| {{{.}}} |
{{/multiRun}}
{{/hasMultiRun}}
{{/items}}