> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/local-governance/v2.8/platform/configure-digit/qa-automation/automation-framework-knowledge-base.md).

# Automation Framework Knowledge Base

## **Problem Statement**

* Provide an approach on how Consumers and Producer based 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

## **The Solution**

* Design & Implement Robust Automation Framework
* Build a modular Framework so any future changes don’t have an impact on the entire framework but limited to a specific area

## **The Goal**

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

## **Plan and Outcomes**

![](https://1885278393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYtUmELy66UydIQtJOn5%2Fuploads%2FxxTDUblM5IHRGhmCzQ47%2F156.png?alt=media)

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

![](https://1885278393-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYtUmELy66UydIQtJOn5%2Fuploads%2Fxbczp2naC9GYo3p37haw%2F157.png?alt=media)

#### **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, you can easily overwrite config variables within each individual test-script - which is very convenient when in dev-mode or rapid-prototyping and also environment specific Config will be taken care of here. external config file having host name, credentials, stateCode, cityCode, etc.
4. Test Properties: Contains all properties related to Tests cases like Feature file, Http requests, responses, test data etc.
5. Framework Properties: Contains All properties related to Karate framework like pom.xml, YAML files, .md files etc.
6. Reports: We can generate default BDD cucumber reports and we can 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 in tests.

## **Technologies Used**

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

> [![Creative Commons License](https://i.creativecommons.org/l/by/4.0/80x15.png)\_\_](http://creativecommons.org/licenses/by/4.0/)*All content on this page by* [*eGov Foundation* ](https://egov.org.in/)*is licensed under a* [*Creative Commons Attribution 4.0 International License*](http://creativecommons.org/licenses/by/4.0/)*.*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digit.org/local-governance/v2.8/platform/configure-digit/qa-automation/automation-framework-knowledge-base.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
