0

I am working on a project that involves three Flutter apps: a customer app, a driver app, and a pioneer app. We have already written integration tests for each app, but now we need to write a full end-to-end integration test that covers the entire cycle of ordering food from the pioneer app, delivering it to the customer, and marking the order as delivered. Specifically, we need to first run an integration test on the pioneer app to create a product, then run a second integration test on the customer app to order this product, and finally, open the pioneer app to accept the order and run an integration test on the driver app to accept and deliver the order to the customer. Can anyone suggest a way to achieve this in Flutter?

i am using patrol in integration test.

Abd Alazeez
  • 126
  • 1
  • 5
  • Can you please provide more information? What system are you using to do your already written integration tests? And what sort of backend are you using to communicate between these apps? – Tim May 25 '23 at 12:21
  • I am using Flutter to develop my mobile app and WidgetTester to run integration tests. For the backend, I am using an AWS EC2 instance as the server and an ASP.NET web API to communicate between the app and the backend. hope this helps provide some context for my integration test setup. – Abd Alazeez May 25 '23 at 13:07

1 Answers1

0

You can run all 3 apps simultaneously. A batch file running each on web could even work on a remote linux system (the batch file may need to start other batch files, each doing a flutter run -d web). If you want to automate the sequence of tests, then you would need some sort of controller which can wait for a test to finish before starting the next.

You could use one of the 3 apps or your backend to create an http service which indicates which phase of testing should currently be running.

I recommend setting it up as follows:

  1. Create the test server as a route on your backend
  2. Create a test on each app which has different states based on its controller.
  3. Create a listener on the server which waits for all 3 devices to send an initial signal.
  4. Have the server send a signal which indicates that a specific test should be active (the overall test state).
  5. Each app should be listening for a specific signal to start its tests.
  6. Send all errors and relevant logs to the server where all 3 test logs can be concatenated.
  7. Have the test send a signal to the server to indicate that the next test should begin.
  8. Repeat 4-7 for each app
Tim
  • 92
  • 10