-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Patrol on Firebase Test Lab #332
Comments
Hi @Giuspepe! Congrats on opening the first external issue in this repository! 🥳
We definitely want to make Patrol run on as many CI providers as possible. I don't have much experience using Firebase Test Lab, so I quickly skimmed through its docs and from what I see, they let you upload the APK of the app under test ( Until now, we've made Patrol run integration tests on GitHub Actions. Check out the |
Hello, @bartekpacia could you give some hint how did you integrate patrol tests on your CI?
|
Hi @pawlowskim 👋
GitHub Actions. You can see the workflow files in the
Currently, we only use Android emulators. We want to run tests on iOS simulators and physical iOS devices as well, but that'd require us to use some device farm. We didn't have time for this yet, but it's definitely on our radar.
Short answer: we don't. We run a single test and if it fails, I can assure you though that will focus on this area in the near future. If you have any ideas or suggestions on how we should approach this topic (or just some random, useful thoughts on the topic), share them with us :) PS Another problem we're facing in GitHub Actions is the flakiness of connecting to the VM service running on the device. See #272 to learn more. |
I would like to understand why we need to call Maybe you can guide me to some of the files that are important to fully understand this problem. Maybe we can also document how patrol works internally in #173 :) |
Exactly. We need to run the native automation server, which enables interaction with native UI, and there's no way to do this by using only
Good idea. |
@bartekpacia For example: /*imports*/
-@RunWith(FlutterTestRunner.class)
+@RunWith(PatrolTestRunner.class)
public class MainActivityTest {
@Rule
public ActivityTestRule<MainActivity> rule = new ActivityTestRule<>(MainActivity.class, true, false);
} This might be a naiv impl for starting the server. class PatrolTestRunner extends FlutterTestRunner {
public PatrolTestRunner(Class<?> testClass) {
super(testClass);
}
@Override
public void run(RunNotifier notifier) {
startPatrolServer();
super.run(notifier);
stopPatrolServer();
}
} We can also move this into a Github discussion if you like. Or we can have a quick chat/call 👍🏽 |
@JulianBissekkou This looks very interesting – thank you! I'll share this with the team and get back to you. I think there's no need for a separate Discussion – this issue is the right place for this. |
On iOS this might be a little tricky because we can't just subclass |
@JulianBissekkou, we're working on this in #661 :) |
I'm happy to say that basic support is almost ready 🎉 All that's left is writing good docs (and maybe squashing some bugs) :) |
@bartekpacia very exciting |
Look no further! Here are the docs! Please report issues in case there are problems :) But Firebase Test Lab is now officially supported. |
Really cool! Good job guys 💪🏽 |
Yes! |
Just got the time to integrate patrol into my app. When running the tests from the IDE we still have to use |
Oops, forgot to respond because :) Sorry!
Currently, you can use
But |
This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue. |
This package looks very promising and easy to use - thanks for open sourcing it!
Are there plans to make patrol compatible with running integration tests on Firebase Test Lab?
If I understand correctly, patrol can be used on local machines by running
patrol drive
, but I haven't found any instructions on whether it's possible to use patrol on CI/CD as well. I'm thinking of something similar to the integration_test package which makes it possible to run integration tests on CI/CD with Firebase Test Lab (see the following instructions: https://docs.flutter.dev/testing/integration-tests#testing-on-firebase-test-lab).The text was updated successfully, but these errors were encountered: