# Automation Framework Knowledge Base

## **Problem Statement**

* Provide an approach on how Consumer and Producer APIs will be tested
* POC on below core services to showcase all automation principles and guide
* Localisation- Upsert and search call
* FileStore- Search File
* Property Tax- Create Property

## **Solution**

* Design & Implement a Robust Automation Framework.
* Build a modular Framework so any future changes are limited to a specific area and do not impact the entire framework.

## **Goal**

* Implement a framework that is robust enough to function with minimal changes
* The framework handles multi-tenant with only properties update
* The framework can switch environments with no manual update
* A new environment can be integrated with updates to framework properties

## **Plan and Outcomes**

![](/files/-MbZf8pC-EBvTUfbzVnN)

### **Automation Framework: High-Level Architecture**

![](/files/-MbZf8pD3xk1kuL-ulcc)

#### **Description**

Global Properties:

1. Configuration The only rule is that on start-up Karate expects a file called karate-config.js to exist on the classpath and contain a JavaScript function. The function is expected to return a JSON object and all keys and values in that JSON object will be made available as script variables. And that's all there is to Karate configuration! You can easily get the value of the current 'environment' or 'profile', and then set up 'global' variables using some simple JavaScript.
2. Global Variables: Non-JSON values such as Java object references or JS functions are supported only if they are at the "root" of the JSON returned from karate-config.js.
3. Multiple Environment: Karate is flexible and allows users to overwrite the configuration variables within each test script - which is very convenient when in development mode or for rapid prototyping. This also takes care of environment-specific configuration. The external configuration file contains the hostname, credentials, stateCode, cityCode, etc.
4. Test Properties: Contains all properties related to test cases like feature files, HTTP requests, responses, test data etc.
5. Framework Properties: Contains all properties related to the Karate framework like pom.xml, YAML files, .md files etc.
6. Reports: We can generate default BDD cucumber reports and integrate reporting plugins.
7. Tests: Contains test scenarios feature files with execution tags, assertions etc.
8. MDMS call: Fetching the test data from MDMS and using it in tests.

## **Technologies Used**

* Java
* JavaScript
* Gherkin
* BDD framework - Behavior Driven Development is a software development approach.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digit.org/local-governance/deploy/configure-digit/qa-automation/automation-framework-knowledge-base.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
