opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://opensrp.io
Apache License 2.0
58 stars 59 forks source link

SubTask - Integrate cucumber for instrumentation test #682

Closed f-odhiambo closed 2 years ago

f-odhiambo commented 3 years ago

Check on the latest version v4.9.0 if we can be able to resolve the issues around compose and cucumber and allow us to write tests on the app using the Gherkin Syntax via Cucumber-Android BDD testing

f-odhiambo commented 3 years ago

Update - NOv 15th 2021 Kindly note this item is still on RnD. There's not much breakthrough as yet. Unless we are to implement this without Gherkin Adding items is blocked and requires research CC @pld

f-odhiambo commented 2 years ago

Marking this as unblocked - Support for Cucumber Jetpack compose plugging available in latest release https://github.com/cucumber/cucumber-android/releases/tag/v4.9.0

f-odhiambo commented 2 years ago

Update Feb 25th, 2022 Concluded to use Espresso without Cucumber due to faces issues

NaveenZehra11 commented 2 years ago

after soo much r&D we can not find any solution to write jetpak ui cases using cucumber(gherkin) so for now we start only with espresso on login page of anc cc @Mstjamush

Mstjamush commented 2 years ago

Work on Espresso started. Had projected the initial timeline to 22nd March which was dependent on QA requests. This has been recalibrated to 31st March.

However, we are facing the following blockers :

  1. The build time. Application is taking too long to build making tests timeout
  2. Sync is taking too long. Most actions are dependent on the completion of the sync process. This is taking too long making them time out
  3. ApplicationID. Currently, we are having the tests ignore the ApplicationID page. This is leading the app to crash on login. Engaging the team for a possible workaround

Cc @f-odhiambo & @pld

f-odhiambo commented 2 years ago

Work on Espresso started. Had projected the initial timeline to 22nd March which was depended on QA requests. This has been recalibrated to 31st March.

However, we are facing the following blockers :

  1. The build time. Application is taking too long to build making tests timeout
  2. Sync is taking too long. Most actions are dependent on the completion of the sync process. This is taking too long making them time out
  3. ApplicationID. Currently, we are having the tests ignore the ApplicationID page. This is leading the app to crash on login. Engaging the team for a possible workaround

Cc @f-odhiambo & @pld

Updated target end date on the Product Roadmap

CC @pld

pld commented 2 years ago

Work on Espresso started. Had projected the initial timeline to 22nd March which was dependent on QA requests. This has been recalibrated to 31st March.

However, we are facing the following blockers :

1. The build time. Application is taking too long to build making tests timeout

I wonder what we are doing different here versus other place we are running tests, @ndegwamartin is this something you can take a look at?

2. Sync is taking too long. Most actions are dependent on the completion of the sync process. This is taking too long making them time out

Are we restricting the sync to only whats needed for the app ID we give? Is this pulling data from a specific testing server or the general server? We might want a separate testing server, but we definitely want a specific testing app ID, that should make what's pulled predictable and let use control its size

3. ApplicationID. Currently, we are having the tests ignore the ApplicationID page. This is leading the app to crash on login. Engaging the team for a possible workaround

Don't we want to submit an app ID on the app ID page?

Cc @f-odhiambo & @pld

Cool, thanks, adding some questions inline above

NaveenZehra11 commented 2 years ago

if i manually one time give the application id and initailize the login page still this error showing Screenshot from 2022-03-29 14-19-19 cc @Mstjamush @f-odhiambo

Mstjamush commented 2 years ago

The documentation the steps for all the test cases for quest app will be done as per the timelines. (31st March 2022) ANC will have most of the work done too, but will overflow However, challenges on implementation of the App Settings page and sync are a major issue on having the tests working due to the flow and wait time which is making most of them time out.

pld commented 2 years ago

OK thanks @Mstjamush that sounds good, the key deliverable we're looking for is automated running on PR so we can reduce regressions

Mstjamush commented 2 years ago

OK thanks @Mstjamush that sounds good, the key deliverable we're looking for is automated running on PR so we can reduce regressions

This is noted We however have to find a work around to the App Setting page issue, and the Sync issue earlier raised. These are still a major challenge. Is it possible to

  1. Have tests run from the login page?
  2. Have a defined test server to sync from that has limited data, and can be cleaned after tests?
pld commented 2 years ago

Cool, yep both of those makes sense to me @ndegwamartin can you please follow-up to unblock this?

ndegwamartin commented 2 years ago

Cool, yep both of those makes sense to me @ndegwamartin can you please follow-up to unblock this?

@pld will do

Mstjamush commented 2 years ago

Update for AppSettingActivity page We managed to get a work around. This is incorporating what @ellykits and @ndegwamartin explained plus introducing a runner class. The runner class will enable one to run test classes in an order specified in the class, thus having the first test class in the list run from the App Setting page, and the proceeding test classes initialise the Login page

Yet to be handled is the sync issue

Cc @f-odhiambo & @pld

pld commented 2 years ago

was this closed by? https://github.com/opensrp/fhircore/pull/1306

f-odhiambo commented 2 years ago

Closed via https://github.com/opensrp/fhircore/pull/1306

f-odhiambo commented 2 years ago

I don't think this is related @pld, let me reach out to @Mstjamush , this was brought up when we were doing Notice E0 for Gherking test intergration

f-odhiambo commented 2 years ago

Update We will only do Espresso instrumented tests, And this will run on CI

pld commented 2 years ago

Sounds great! Can you merge something into main that test pre-sync parts of the app?

On Apr 4, 2022, at 04:05, Josphat Muindi @.***> wrote:

 Update for AppSettingActivity page We managed to get a work around. This is incorporating what @ellykits and @ndegwamartin explained plus introducing a runner class. The runner class will enable one to run test classes in an order specified in the class, thus having the first test class in the list run from the App Setting page, and the proceeding test classes initialise the Login page

Yet to be handled is the sync issue

Cc @f-odhiambo & @pld

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.