> 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/public-finance/v2.3/exemplar/mgramseva/user-manual/integration-testing.md).

# Integration Testing

Integration testing (also called end-to-end testing or GUI testing) is used to simulate a user interacting

with your app by doing things like clicking buttons, selecting items, scrolling items, etc.\
Integration testing is used to test how individual pieces work together as a whole, or capture the performance of an application running on a real device.

![](/files/DsR2zGX1AZsmgsLQznft)

### **Plugin used**

integration\_test

### &#x20;**Setup for Integration Test**

![img1](/files/3tYI0RoAjgh8Lczf79Px)

* We declared the integration\_test package in pubspec.yaml as shown in the img.1

![img 2](/files/zDeqJSkNu0rQfjvEa9lC)

* The test\_driver directory, contains the integration\_test\_driver.dart file. (The folder structure is shown in img. 2). Inside this file, the integration driver is called.&#x20;
* The integration\_test directory contains the test script files of different screens. &#x20;
* The Test Inputs directory contains the test\_inputs.dart file. This file has the user actions inputs in json format. We can change user actions in this file.&#x20;

### **Run the Integration Test**

There are two ways to start the integration testing :

* To run the integration test on virtual emulator / mobile , run the command on your terminal :\
  `cd ./frontend/mgramseva && flutter drive --driver=test_driver/integration_test_driver.dart`\
  `--target=integration_test/login_test.dart`

(---or---)

* Go to `./frontend/mgramseva/utils/execute_integration.sh` and run the `execute_integration.sh` file on the virtual emulator / mobile . The integration test will start.

### **Files Path**

User actions Inputs - `.frontend/mgramseva/integration_test/Test Inputs/test_inputs.dart`

Integration Test Driver - `.frontend/mgramseva/test_driver/integration_test_driver.dart`

Execute Integration Test - `.frontend/mgramseva/utils/execute_integration.sh`

### &#x20;**Reference Links**

[<img src="https://docs.flutter.dev/assets/images/shared/brand/flutter/icon/64.png" alt="" data-size="line">An introduction to integration testing](https://docs.flutter.dev/cookbook/testing/integration/introduction)

> [![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 dynamically by asking a question.

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

```
GET https://docs.digit.org/public-finance/v2.3/exemplar/mgramseva/user-manual/integration-testing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
