-
Notifications
You must be signed in to change notification settings - Fork 146
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
Generated test bundle is broken on Patrol 2.0 on Windows #1428
Comments
Hi, thanks for reporting. I see you're on Windows - it'll slow down me reproducing this problem and helping you. |
@bartekpacia maybe this helps. I tried changing a little bit the command and the issue dissapeared but another one came to life: No device specified, using the first one (emulator-5554)
✗ Failed to build apk with entrypoint test_bundle.dart (Gradle build failed with code 1) (32.7s) |
@bartekpacia using this command "patrol test --target integration_test\main_test.dart" it works on this test project, but on my working project I get this issue: #1428 (comment) |
This looks like a bug related to Windows path separator. Try doing |
If you check the Actual Result part on this issue, you will see that when I try this command "patrol test --target integration_test/main_test.dart" then test_bundle.dart is not generated correctly |
Yup I see. For the record, here's the code responsible for generating that file. The bug is probably lurking there. |
Can you help me with this bug? #1428 (comment) This is the issue I am stuck. |
Hi, unfortunately, that looks like some compiler crash. No idea why it happens. |
@GentiShtjefni have you tried this:
Maybe it's old files getting in the way of your updated build process. |
No device specified, using the first one (emulator-5554) |
See |
I want to notice, that I have a similar problem on Windows. When I try tun my test, using command: |
@victoria24a try |
Better, but now it freezes the tests don't start on device: No device specified, using the first one (RF8NB1E5QSH) |
I confirm running // START: GENERATED TEST IMPORTS
import '/example_test.dart' as __example_test;
// END: GENERATED TEST IMPORTS
Future<void> main() async {
// ...
// START: GENERATED TEST GROUPS
group('.example_test', __example_test.main);
// END: GENERATED TEST GROUPS
// ...
} Running |
@bartekpacia running |
@GentiShtjefni This is a different problem. Please open a new issue for it (and remember to attach output of |
I have reported separate issue #1456. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This worked for me. I am on windows. |
I'm not sure what the correct behavior should be. Questions Should the below invocation work on Windows? (I guess "yes"?)
Should the below invocation work on Unix? (I guess "no"?)
|
@bartekpacia do you think replacing the first
after this line |
* Removing first slash, closes #1428 * Formatted packages\patrol_cli\lib\src\test_bundler.dart * Update CHANGELOG.md
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. |
Steps to reproduce
Create a simple Flutter project and setup patrol native automation.
main_test.dart:
MainActivityTest.java:
build.gradle:
Actual results
This is the error i get
C:\Users\User\AndroidStudioProjects\int_test>patrol test --target integration_test/main_test.dart
You're using Patrol CLI 2.0, which has breaking changes.
Read the migration guide at https://patrol.leancode.co/v2.
Disable this warning by setting the PATROL_MIGRATED environment variable.
No device specified, using the first one (emulator-5554)
• Building apk with entrypoint test_bundle.dart...
integration_test/test_bundle.dart:12:8: Error: Error when reading '/main_test.dart': The system cannot find the file specified.
✗ Failed to build apk with entrypoint test_bundle.dart (Gradle build failed with code 1) (38.4s)
Exception: Gradle build failed with code 1
See the logs above to learn what happened. Also consider running with --verbose. If the logs still aren't useful, then it's a bug - please report it.
FAIL test_bundle.dart on emulator-5554
Logs
Logs
Patrol version
patrol: 2.0.0
Patrol Doctor output
Patrol Doctor output
Flutter Doctor output
Flutter Doctor output
The text was updated successfully, but these errors were encountered: