Skip to content

Commit 6bbdf2b

Browse files
authored
Merge branch 'main' into setup-datastore-interface
2 parents 9d3b9a6 + c54c75a commit 6bbdf2b

File tree

4 files changed

+33
-22
lines changed

4 files changed

+33
-22
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Testing
2+
3+
The OpenSRP Android app includes automated style, coverage, unit, user inteface / integartion, and performance testing. All tests are run through github actions on pull request and must be passed for a pull request to be merged without an admin override.
4+
5+
## Style and coverage tests
6+
7+
We use [ktlint](https://github.com/pinterest/ktlint) via [spotless](https://github.com/diffplug/spotless) to run style checks against the entire codebase. We target to make these style checks as strict as possible in order to reduce bikeshedding in code reviews.
8+
9+
We use [Jacoco](https://www.jacoco.org/jacoco/) for code coverage report generation and then [codecov](https://app.codecov.io/gh/opensrp/fhircore) to track changes in coverage over time. We enforce a minimum coverage percent on the new code added in a pull request and a minimum reduction in overall coverage percentage change when consider the changes introduced through a pull request.
10+
11+
## Unit tests
12+
13+
Unit tests are divided among the [engine](https://github.com/opensrp/fhircore/tree/main/android/engine/src/test), [geowidget](https://github.com/opensrp/fhircore/tree/main/android/geowidget/src/test/java/org/smartregister/fhircore/geowidget), and [quest](https://github.com/opensrp/fhircore/tree/main/android/quest/src/test) modules. These can be run locally and are run automatically through github actions when you submit a pull request. All tests must pass for a pull request to be merged.
14+
15+
## User interface and integration tests
16+
17+
We run tests against screen renderings that function as user interface and integations tests. These are defined in the [quest](https://github.com/opensrp/fhircore/tree/main/android/quest/src/test) module. These can be run locally and are run automatically through github actions when you submit a pull request. All tests must pass for a pull request to be merged.
18+
In addition, we conduct manual tests to accommodate all functionalities and E2E user journeys to include all he steps a user interacts with.
19+
20+
## Performance tests
21+
22+
We include a set of [performance tests](https://github.com/opensrp/fhircore/tree/main/android/quest/src/androidTest/java/org/smartregister/fhircore/performance) to verify that the time taken to perform operations is not changing significantly as the code changes. These measure relative performance when running on the hosted continuous integration testing system and are not meant to reflect the amount of time an operation takes in a real world on-device scenario.
23+
24+
## Device compatibility tests
25+
26+
We run the applications in different devices with different Android versions, RAM and ROM in order to determine the least specifications the application can run on. This key in guiding users.
27+
28+
## Volume testing
29+
30+
We usually insert massive volume of loads of data in order to check the application behavior.

docs/engineering/android-app/developer-setup/code-testing.mdx docs/engineering/android-app/developer-setup/testing/unit-tests.mdx

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# Code Testing
1+
# Unit Tests
22

3-
## Unit Tests
4-
5-
### Naming Conventions
3+
## Naming Conventions
64

75
We follow the following naming convention for our test cases:
86
```

docs/engineering/android-app/readme.mdx

+1-18
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,5 @@ The application syncs particular resources (conventionally, Composition and Bina
6464

6565
### Testing
6666

67-
The OpenSRP Android app includes automated style, coverage, unit, user inteface / integartion, and performance testing. All tests are run through github actions on pull request and must be passed for a pull request to be merged without an admin override.
67+
See [testing section](/engineering/android-app/developer-setup/testing).
6868

69-
#### Style and coverage tests
70-
71-
We use [ktlint](https://github.com/pinterest/ktlint) via [spotless](https://github.com/diffplug/spotless) to run style checks against the entire codebase. We target to make these style checks as strict as possible in order to reduce bikeshedding in code reviews.
72-
73-
We use [Jacoco](https://www.jacoco.org/jacoco/) for code coverage report generation and then [codecov](https://app.codecov.io/gh/opensrp/fhircore) to track changes in coverage over time. We enforce a minimum coverage percent on the new code added in a pull request and a minimum reduction in overall coverage percentage change when consider the changes introduced through a pull request.
74-
75-
#### Unit tests
76-
77-
Unit tests are divided among the [engine](https://github.com/opensrp/fhircore/tree/main/android/engine/src/test), [geowidget](https://github.com/opensrp/fhircore/tree/main/android/geowidget/src/test/java/org/smartregister/fhircore/geowidget), and [quest](https://github.com/opensrp/fhircore/tree/main/android/quest/src/test) modules. These can be run locally and are run automatically through github actions when you submit a pull request. All tests must pass for a pull request to be merged.
78-
79-
#### User interface and integration tests
80-
81-
We run tests against screen renderings that function as user interface and integations tests. These are defined in the [quest](https://github.com/opensrp/fhircore/tree/main/android/quest/src/test) module. These can be run locally and are run automatically through github actions when you submit a pull request. All tests must pass for a pull request to be merged.
82-
83-
#### Performance tests
84-
85-
We include a set of [performance tests](https://github.com/opensrp/fhircore/tree/main/android/quest/src/androidTest/java/org/smartregister/fhircore/performance) to verify that the time taken to perform operations is not changing significantly as the code changes. These measure relative performance when running on the hosted continuous integration testing system and are not meant to reflect the amount of time an operation takes in a real world on-device scenario.

0 commit comments

Comments
 (0)