Skip to content
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

Patrol (native): packageName is not set. It's recommended to set it. #1416

Closed
lravihs opened this issue Jun 28, 2023 · 44 comments
Closed

Patrol (native): packageName is not set. It's recommended to set it. #1416

lravihs opened this issue Jun 28, 2023 · 44 comments

Comments

@lravihs
Copy link

lravihs commented Jun 28, 2023

Steps to reproduce

getting an error

Actual results

Exactly done the setup what are all the given in patrol 2.0 https://patrol.leancode.co/getting-started/native even after doing all these getting this error
Screenshot 2023-06-28 at 1 38 55 PM
Can anyone help me regarding this issue.?

Logs

Testing started at 1:26 pm ...
Running Gradle task 'assembleJkDebug'...
[jk:lib/assets/flavors/jk/app_settings.json]
flavorjk
Running Gradle task 'assembleJkDebug'... 14.4s
✓ Built build/app/outputs/flutter-apk/app-jk-debug.apk.
Installing build/app/outputs/flutter-apk/app-jk-debug.apk... 827ms

Patrol (native): packageName is not set. It's recommended to set it.
dart:core _AssertionError._throwNew
package:flutter/src/foundation/binding.dart 150:12 new BindingBase
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding&RendererBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding&RendererBinding&PaintingBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding&RendererBinding&PaintingBinding&WidgetsBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding&RendererBinding&PaintingBinding&WidgetsBinding&TestDefaultBinaryMessengerBinding
package:flutter_test/src/binding.dart new TestWidgetsFlutterBinding
package:flutter_test/src/binding.dart new LiveTestWidgetsFlutterBinding
package:integration_test/integration_test.dart new IntegrationTestWidgetsFlutterBinding
package:patrol/src/binding.dart new PatrolBinding
package:patrol/src/binding.dart 107:7 new PatrolBinding.ensureInitialized
package:patrol/src/common.dart 65:39 patrolTest
Users/lallu/Documents/GitHub/Next-Gen-App/integration_test/app_test.dart 56:3 main

Failed to load "/Users/lallu/Documents/GitHub/Next-Gen-App/integration_test/app_test.dart": 'package:flutter/src/foundation/binding.dart': Failed assertion: line 150 pos 12: '_debugInitializedType == null': Binding is already initialized to IntegrationTestWidgetsFlutterBinding

Patrol version

patrol:^2.0.0

Patrol Doctor output

Testing started at 1:26 pm ...
Running Gradle task 'assembleJkDebug'...
[jk:lib/assets/flavors/jk/app_settings.json]
flavorjk
Running Gradle task 'assembleJkDebug'... 14.4s
✓ Built build/app/outputs/flutter-apk/app-jk-debug.apk.
Installing build/app/outputs/flutter-apk/app-jk-debug.apk... 827ms

Patrol (native): packageName is not set. It's recommended to set it.
dart:core _AssertionError._throwNew
package:flutter/src/foundation/binding.dart 150:12 new BindingBase
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding&RendererBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding&RendererBinding&PaintingBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding&RendererBinding&PaintingBinding&WidgetsBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding&RendererBinding&PaintingBinding&WidgetsBinding&TestDefaultBinaryMessengerBinding
package:flutter_test/src/binding.dart new TestWidgetsFlutterBinding
package:flutter_test/src/binding.dart new LiveTestWidgetsFlutterBinding
package:integration_test/integration_test.dart new IntegrationTestWidgetsFlutterBinding
package:patrol/src/binding.dart new PatrolBinding
package:patrol/src/binding.dart 107:7 new PatrolBinding.ensureInitialized
package:patrol/src/common.dart 65:39 patrolTest
Users/lallu/Documents/GitHub/Next-Gen-App/integration_test/app_test.dart 56:3 main

Failed to load "/Users/lallu/Documents/GitHub/Next-Gen-App/integration_test/app_test.dart": 'package:flutter/src/foundation/binding.dart': Failed assertion: line 150 pos 12: '_debugInitializedType == null': Binding is already initialized to IntegrationTestWidgetsFlutterBinding

Flutter Doctor output

Testing started at 1:26 pm ...
Running Gradle task 'assembleJkDebug'...
[jk:lib/assets/flavors/jk/app_settings.json]
flavorjk
Running Gradle task 'assembleJkDebug'... 14.4s
✓ Built build/app/outputs/flutter-apk/app-jk-debug.apk.
Installing build/app/outputs/flutter-apk/app-jk-debug.apk... 827ms

Patrol (native): packageName is not set. It's recommended to set it.
dart:core _AssertionError._throwNew
package:flutter/src/foundation/binding.dart 150:12 new BindingBase
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding&RendererBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding&RendererBinding&PaintingBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding&RendererBinding&PaintingBinding&WidgetsBinding
package:flutter_test/src/binding.dart new _TestWidgetsFlutterBinding&BindingBase&SchedulerBinding&ServicesBinding&GestureBinding&SemanticsBinding&RendererBinding&PaintingBinding&WidgetsBinding&TestDefaultBinaryMessengerBinding
package:flutter_test/src/binding.dart new TestWidgetsFlutterBinding
package:flutter_test/src/binding.dart new LiveTestWidgetsFlutterBinding
package:integration_test/integration_test.dart new IntegrationTestWidgetsFlutterBinding
package:patrol/src/binding.dart new PatrolBinding
package:patrol/src/binding.dart 107:7 new PatrolBinding.ensureInitialized
package:patrol/src/common.dart 65:39 patrolTest
Users/lallu/Documents/GitHub/Next-Gen-App/integration_test/app_test.dart 56:3 main

Failed to load "/Users/lallu/Documents/GitHub/Next-Gen-App/integration_test/app_test.dart": 'package:flutter/src/foundation/binding.dart': Failed assertion: line 150 pos 12: '_debugInitializedType == null': Binding is already initialized to IntegrationTestWidgetsFlutterBinding

@bartekpacia
Copy link
Contributor

Please show me the command you're executing.

I'm pretty sure you're using flutter test integration_test, which must not be used with Patrol. This is explained in the Getting Started guide.

@lravihs
Copy link
Author

lravihs commented Jun 28, 2023

I am getting this error if I use this command
Screenshot 2023-06-28 at 2 33 09 PM

@bartekpacia
Copy link
Contributor

Please show me your test code.

@bartekpacia
Copy link
Contributor

Thanks for providing the sample code.
Could you tell me if it works if you remove the whole tearDown() block?

@lravihs
Copy link
Author

lravihs commented Jun 28, 2023

This is the result I am getting if I remove it :

lallu@Laliths-MacBook-Pro Next-Gen-App % patrol test -d emulator-5554 --flavor jk integration_test/app_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.

• Building apk with entrypoint test_bundle.dart...
integration_test/test_bundle.dart:51:46: Error: 'DartTestGroup' isn't a type.
final testExplorationCompleter = Completer();
^^^^^^^^^^^^^
integration_test/test_bundle.dart:60:27: Error: Method not found: 'createDartTestGroup'.
final dartTestGroup = createDartTestGroup(topLevelGroup);
^^^^^^^^^^^^^^^^^^^
integration_test/test_bundle.dart:69:22: Error: Method not found: 'PatrolAppService'.
final appService = PatrolAppService(topLevelDartTestGroup: dartTestGroup);
^^^^^^^^^^^^^^^^
integration_test/test_bundle.dart:71:9: Error: Method not found: 'runAppService'.
await runAppService(appService);
^^^^^^^^^^^^^
integration_test/test_bundle.dart:70:11: Error: The setter 'patrolAppService' isn't defined for the class 'PatrolBinding'.
- 'PatrolBinding' is from 'package:patrol/src/binding.dart' ('../../../.pub-cache/hosted/pub.dev/patrol-1.1.5/lib/src/binding.dart').
Try correcting the name to the name of an existing setter, or defining a setter or field named 'patrolAppService'.
binding.patrolAppService = appService;
^^^^^^^^^^^^^^^^
integration_test/test_bundle.dart:76:25: Error: The method 'markPatrolAppServiceReady' isn't defined for the class 'NativeAutomator'.
- 'NativeAutomator' is from 'package:patrol/src/native/native_automator.dart' ('../../../.pub-cache/hosted/pub.dev/patrol-1.1.5/lib/src/native/native_automator.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markPatrolAppServiceReady'.
await nativeAutomator.markPatrolAppServiceReady();
^^^^^^^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception

    FAILURE: Build failed with an exception.
    
    * Where:
    Script '/Users/lallu/Documents/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1201
    
    * What went wrong:
    Execution failed for task ':app:compileFlutterBuildJkDebug'.
    > Process 'command '/Users/lallu/Documents/flutter/bin/flutter'' finished with non-zero exit value 1
    
    * Try:
    > Run with --stacktrace option to get the stack trace.
    > Run with --info or --debug option to get more log output.
    > Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    
    BUILD FAILED in 3s

✗ Failed to build apk with entrypoint test_bundle.dart (Gradle build failed with code 1) (3.7s)
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.

@bartekpacia
Copy link
Contributor

bartekpacia commented Jun 28, 2023

Yeah... what version of the patrol package are you using? (please show me your pubspec.yaml)

@bartekpacia
Copy link
Contributor

Also, it's quite strange what you're saying happens:

  1. The app builds fine.
  2. You remove the tearDown() block in a test file in integration_test
  3. The app stops building.

@lravihs
Copy link
Author

lravihs commented Jun 28, 2023

I am using patrol: ^2.0.0 and patrol_cli v2.0.0

@lravihs
Copy link
Author

lravihs commented Jun 28, 2023

Can you please suggest me from where should I make the setup for patrol from the scratch so that I can configure once again and come back to you with the result.?

@bartekpacia
Copy link
Contributor

I am using patrol: ^2.0.0 and patrol_cli v2.0.0

OK, so the latest ones - great. So that's not a problem.

The whole native automation setup is described here. I suggest you step through it once again to make sure you've not missed any step.

@lravihs
Copy link
Author

lravihs commented Jun 28, 2023

Let me do the native automation setup once again and will revert

@bartekpacia
Copy link
Contributor

OK.

It'd help if you shared your repository, so I can just clone it and see what the errors are. Much faster than guessing here :)

@lravihs
Copy link
Author

lravihs commented Jun 28, 2023

Sorry for it as sharing the repository violates our company policy

@lravihs
Copy link
Author

lravihs commented Jun 28, 2023

I just wanna know in which places should I mention our package name.?
Screenshot 2023-06-28 at 3 35 21 PM
Screenshot 2023-06-28 at 3 35 36 PM

Do I need to replace my package name in this alone?

@bartekpacia
Copy link
Contributor

You only should change the package name at the top of MainActivityTesr.java file.

@lravihs
Copy link
Author

lravihs commented Jun 28, 2023

Okay

@lravihs
Copy link
Author

lravihs commented Jun 28, 2023

I am now able to get the pass status in it, but it's running in an isolated environment as I want to run it in the device or emulator. Can you please help me in it.?
Screenshot 2023-06-28 at 4 25 31 PM

@bartekpacia
Copy link
Contributor

What do you mean by "it's running in an isolated environment"? I see it says that it's running on the connected Android emulator. Can you maybe show a screen recording?

@lravihs
Copy link
Author

lravihs commented Jun 28, 2023

No it's not running in the device, it's running like the widget_test

@bartekpacia
Copy link
Contributor

Did you set nativeAutomation: true in a call to patrolTest(). You must in order to run like a real app. IGL, please show your test :)

@lravihs
Copy link
Author

lravihs commented Jun 28, 2023

Yes I set nativeAutomation: true, please check the screen recording

screen-recording-2023-06-28-at-44357-pm_JEO74Ltp.mp4

@bartekpacia
Copy link
Contributor

This looks like a problem with native setup - I've seen it a few times. Your tests do not run at all. Please run with --verbose and post the logs.

@lravihs
Copy link
Author

lravihs commented Jun 28, 2023

Is there any resolution for this?

@bartekpacia
Copy link
Contributor

Yes, you have to do the setup correctly. When one of the things is done wrong, such strange things happen and there's not much we can do about it.

I need your app/build.gradle, MainActivityTest.java, and the paths where they're located. That's what people get wrong often.

Also, can you please show me the logs?

@lravihs
Copy link
Author

lravihs commented Jun 29, 2023

I am getting this error if I am going to run with iOS simulators

No device specified, using the first one (iPhone 14 Pro)
• Building app with entrypoint test_bundle.dart for iOS simulator (debug)...
2023-06-29 12:16:22.689 xcodebuild[24241:216982] DVTPortal: Service '<DVTPortalViewDeveloperService: 0x11ce17a70; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100')
2023-06-29 12:16:22.689 xcodebuild[24241:216982] DVTPortal: Error:
Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={
creationTimestamp = "2023-06-29T06:46:22Z";
httpCode = 200;
protocolVersion = QH65B2;
requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action";
responseId = "65e79533-2d7b-43ac-8fc3-40e3ef7073b3";
resultCode = 1100;
resultString = "Your session has expired. Please log in.";
userLocale = "en_US";
userString = "Your session has expired. Please log in.";
}, NSLocalizedDescription=Your session has expired. Please log in.}

@lravihs
Copy link
Author

lravihs commented Jun 29, 2023

MainActivityTest.java

package com.paytronix.nexgenfl;

import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import pl.leancode.patrol.PatrolJUnitRunner;

@RunWith(Parameterized.class)
public class MainActivityTest {
    @Parameters(name = "{0}")
    public static Object[] testCases() {
        PatrolJUnitRunner instrumentation = (PatrolJUnitRunner) InstrumentationRegistry.getInstrumentation();
        instrumentation.setUp(MainActivity.class);
        instrumentation.waitForPatrolAppService();
        return instrumentation.listDartTests();
    }

    public MainActivityTest(String dartTestName) {
        this.dartTestName = dartTestName;
    }

    private final String dartTestName;

    @Test
    public void runDartTest() {
        PatrolJUnitRunner instrumentation = (PatrolJUnitRunner) InstrumentationRegistry.getInstrumentation();
        instrumentation.runDartTest(dartTestName);
    }
}

path : /Users/lallu/Documents/GitHub/Next-Gen-App/android/app/src/main/java/com/paytronix/nexgenfl/MainActivityTest.java

@lravihs
Copy link
Author

lravihs commented Jun 29, 2023

can you please provide me the resolution?. I have given the inputs you have asked for

@bartekpacia
Copy link
Contributor

bartekpacia commented Jun 29, 2023

The MainActivityTest.java you showed above looks OK.

Please also show app/build.gradle and full output of running patrol, with --verbose enabled. Please also include the command you're executing. Example:

$ patrol test --verbose
<paste output here>

@lravihs
Copy link
Author

lravihs commented Jun 29, 2023

The logs are :

lallu@Laliths-MacBook-Pro hhhh % patrol test --verbose
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.

Verbose mode enabled. More logs will be printed.
Received 1 test target(s)
Received test target: /Users/lallu/Documents/patrol-master/packages/patrol/hhhh/integration_test/example_test.dart
Bundled 1 test(s) in /Users/lallu/Documents/patrol-master/packages/patrol/hhhh/integration_test/test_bundle.dart
$ flutter --no-version-check devices --machine
No device specified, using the first one (1C151FDF600AJN)
Received 1 device(s) to run on
Received device: 1C151FDF600AJN
Received 6 --dart-define(s) (0 custom, 6 internal)
Received internal --dart-define: PATROL_WAIT=0
Received internal --dart-define: PATROL_APP_PACKAGE_NAME=com.paytronix.nexgenfl
Received internal --dart-define: PATROL_ANDROID_APP_NAME=hhhh
Received internal --dart-define: PATROL_IOS_APP_NAME=hhhh
Received internal --dart-define: INTEGRATION_TEST_SHOULD_REPORT_RESULTS_TO_NATIVE=false
Received internal --dart-define: PATROL_TEST_LABEL_ENABLED=true
• Building apk with entrypoint test_bundle.dart...
$ ./gradlew :app:assembleDebug -Ptarget=/Users/lallu/Documents/patrol-master/packages/patrol/hhhh/integration_test/test_bundle.dart -Pdart-defines=UEFUUk9MX1dBSVQ9MA==,UEFUUk9MX0FQUF9QQUNLQUdFX05BTUU9Y29tLnBheXRyb25peC5uZXhnZW5mbA==,UEFUUk9MX0FORFJPSURfQVBQX05BTUU9aGhoaA==,UEFUUk9MX0lPU19BUFBfTkFNRT1oaGho,SU5URUdSQVRJT05fVEVTVF9TSE9VTERfUkVQT1JUX1JFU1VMVFNfVE9fTkFUSVZFPWZhbHNl,UEFUUk9MX1RFU1RfTEFCRUxfRU5BQkxFRD10cnVl
        : > Task :app:preBuild UP-TO-DATE
        : > Task :app:preDebugBuild UP-TO-DATE
        : > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
        : > Task :app:compileFlutterBuildDebug UP-TO-DATE
        : > Task :app:packLibsflutterBuildDebug UP-TO-DATE
        : > Task :integration_test:preBuild UP-TO-DATE
        : > Task :integration_test:preDebugBuild UP-TO-DATE
        : > Task :integration_test:compileDebugAidl NO-SOURCE
        : > Task :patrol:preBuild UP-TO-DATE
        : > Task :patrol:preDebugBuild UP-TO-DATE
        : > Task :patrol:compileDebugAidl NO-SOURCE
        : > Task :app:compileDebugAidl NO-SOURCE
        : > Task :integration_test:packageDebugRenderscript NO-SOURCE
        : > Task :patrol:packageDebugRenderscript NO-SOURCE
        : > Task :app:compileDebugRenderscript NO-SOURCE
        : > Task :app:generateDebugBuildConfig UP-TO-DATE
        : > Task :integration_test:writeDebugAarMetadata UP-TO-DATE
        : > Task :patrol:writeDebugAarMetadata UP-TO-DATE
        : > Task :app:checkDebugAarMetadata UP-TO-DATE
        : > Task :app:cleanMergeDebugAssets
        : > Task :app:mergeDebugShaders UP-TO-DATE
        : > Task :app:compileDebugShaders NO-SOURCE
        : > Task :app:generateDebugAssets UP-TO-DATE
        : > Task :integration_test:mergeDebugShaders UP-TO-DATE
        : > Task :integration_test:compileDebugShaders NO-SOURCE
        : > Task :integration_test:generateDebugAssets UP-TO-DATE
        : > Task :integration_test:packageDebugAssets UP-TO-DATE
        : > Task :patrol:mergeDebugShaders UP-TO-DATE
        : > Task :patrol:compileDebugShaders NO-SOURCE
        : > Task :patrol:generateDebugAssets UP-TO-DATE
        : > Task :patrol:packageDebugAssets UP-TO-DATE
        : > Task :app:mergeDebugAssets
        : > Task :app:copyFlutterAssetsDebug
        : > Task :app:generateDebugResValues UP-TO-DATE
        : > Task :integration_test:compileDebugRenderscript NO-SOURCE
        : > Task :integration_test:generateDebugResValues UP-TO-DATE
        : > Task :integration_test:generateDebugResources UP-TO-DATE
        : > Task :integration_test:packageDebugResources UP-TO-DATE
        : > Task :patrol:compileDebugRenderscript NO-SOURCE
        : > Task :patrol:generateDebugResValues UP-TO-DATE
        : > Task :patrol:generateDebugResources UP-TO-DATE
        : > Task :patrol:packageDebugResources UP-TO-DATE
        : > Task :app:mapDebugSourceSetPaths UP-TO-DATE
        : > Task :app:generateDebugResources UP-TO-DATE
        : > Task :app:mergeDebugResources UP-TO-DATE
        : > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
        : > Task :app:extractDeepLinksDebug UP-TO-DATE
        : > Task :integration_test:extractDeepLinksDebug UP-TO-DATE
        : > Task :integration_test:processDebugManifest UP-TO-DATE
        : > Task :patrol:extractDeepLinksDebug UP-TO-DATE
        : > Task :patrol:processDebugManifest UP-TO-DATE
        : > Task :app:processDebugMainManifest UP-TO-DATE
        : > Task :app:processDebugManifest UP-TO-DATE
        : > Task :app:processDebugManifestForPackage UP-TO-DATE
        : > Task :integration_test:compileDebugLibraryResources UP-TO-DATE
        : > Task :integration_test:parseDebugLocalResources UP-TO-DATE
        : > Task :integration_test:generateDebugRFile UP-TO-DATE
        : > Task :patrol:compileDebugLibraryResources UP-TO-DATE
        : > Task :patrol:parseDebugLocalResources UP-TO-DATE
        : > Task :patrol:generateDebugRFile UP-TO-DATE
        : > Task :app:processDebugResources UP-TO-DATE
        : > Task :integration_test:generateDebugBuildConfig UP-TO-DATE
        : > Task :integration_test:javaPreCompileDebug UP-TO-DATE
        : > Task :integration_test:compileDebugJavaWithJavac UP-TO-DATE
        : > Task :integration_test:bundleLibCompileToJarDebug UP-TO-DATE
        : > Task :patrol:generateDebugBuildConfig UP-TO-DATE
        : > Task :patrol:compileDebugKotlin UP-TO-DATE
        : > Task :patrol:javaPreCompileDebug UP-TO-DATE
        : > Task :patrol:compileDebugJavaWithJavac UP-TO-DATE
        : > Task :patrol:bundleLibCompileToJarDebug UP-TO-DATE
        : > Task :app:compileDebugKotlin UP-TO-DATE
        : > Task :app:javaPreCompileDebug UP-TO-DATE
        : > Task :app:compileDebugJavaWithJavac UP-TO-DATE
        : > Task :app:compressDebugAssets UP-TO-DATE
        : > Task :app:processDebugJavaRes NO-SOURCE
        : > Task :integration_test:processDebugJavaRes NO-SOURCE
        : > Task :integration_test:bundleLibResDebug NO-SOURCE
        : > Task :patrol:processDebugJavaRes NO-SOURCE
        : > Task :patrol:bundleLibResDebug UP-TO-DATE
        : > Task :app:mergeDebugJavaResource UP-TO-DATE
        : > Task :app:checkDebugDuplicateClasses UP-TO-DATE
        : > Task :app:desugarDebugFileDependencies UP-TO-DATE
        : > Task :patrol:bundleLibRuntimeToJarDebug UP-TO-DATE
        : > Task :integration_test:bundleLibRuntimeToJarDebug UP-TO-DATE
        : > Task :app:dexBuilderDebug UP-TO-DATE
        : > Task :app:mergeDexDebug UP-TO-DATE
        : > Task :app:mergeDebugJniLibFolders UP-TO-DATE
        : > Task :integration_test:mergeDebugJniLibFolders UP-TO-DATE
        : > Task :integration_test:mergeDebugNativeLibs NO-SOURCE
        : > Task :integration_test:copyDebugJniLibsProjectOnly UP-TO-DATE
        : > Task :patrol:mergeDebugJniLibFolders UP-TO-DATE
        : > Task :patrol:mergeDebugNativeLibs NO-SOURCE
        : > Task :patrol:copyDebugJniLibsProjectOnly UP-TO-DATE
        : > Task :app:mergeDebugNativeLibs UP-TO-DATE
        : > Task :app:stripDebugDebugSymbols UP-TO-DATE
        : > Task :app:validateSigningDebug UP-TO-DATE
        : > Task :app:writeDebugAppMetadata UP-TO-DATE
        : > Task :app:writeDebugSigningConfigVersions UP-TO-DATE
        : > Task :app:packageDebug UP-TO-DATE
        : > Task :app:createDebugApkListingFileRedirect UP-TO-DATE
        : > Task :app:assembleDebug
        : 
        : BUILD SUCCESSFUL in 1s
        : 71 actionable tasks: 4 executed, 67 up-to-date
$ ./gradlew :app:assembleDebugAndroidTest -Ptarget=/Users/lallu/Documents/patrol-master/packages/patrol/hhhh/integration_test/test_bundle.dart -Pdart-defines=UEFUUk9MX1dBSVQ9MA==,UEFUUk9MX0FQUF9QQUNLQUdFX05BTUU9Y29tLnBheXRyb25peC5uZXhnZW5mbA==,UEFUUk9MX0FORFJPSURfQVBQX05BTUU9aGhoaA==,UEFUUk9MX0lPU19BUFBfTkFNRT1oaGho,SU5URUdSQVRJT05fVEVTVF9TSE9VTERfUkVQT1JUX1JFU1VMVFNfVE9fTkFUSVZFPWZhbHNl,UEFUUk9MX1RFU1RfTEFCRUxfRU5BQkxFRD10cnVl
        : > Task :app:preBuild UP-TO-DATE
        : > Task :app:preDebugBuild UP-TO-DATE
        : > Task :integration_test:preBuild UP-TO-DATE
        : > Task :integration_test:preDebugBuild UP-TO-DATE
        : > Task :integration_test:compileDebugAidl NO-SOURCE
        : > Task :patrol:preBuild UP-TO-DATE
        : > Task :patrol:preDebugBuild UP-TO-DATE
        : > Task :patrol:compileDebugAidl NO-SOURCE
        : > Task :app:compileDebugAidl NO-SOURCE
        : > Task :integration_test:packageDebugRenderscript NO-SOURCE
        : > Task :patrol:packageDebugRenderscript NO-SOURCE
        : > Task :app:compileDebugRenderscript NO-SOURCE
        : > Task :app:generateDebugBuildConfig UP-TO-DATE
        : > Task :integration_test:writeDebugAarMetadata UP-TO-DATE
        : > Task :patrol:writeDebugAarMetadata UP-TO-DATE
        : > Task :app:checkDebugAarMetadata UP-TO-DATE
        : > Task :app:generateDebugResValues UP-TO-DATE
        : > Task :integration_test:compileDebugRenderscript NO-SOURCE
        : > Task :integration_test:generateDebugResValues UP-TO-DATE
        : > Task :integration_test:generateDebugResources UP-TO-DATE
        : > Task :integration_test:packageDebugResources UP-TO-DATE
        : > Task :patrol:compileDebugRenderscript NO-SOURCE
        : > Task :patrol:generateDebugResValues UP-TO-DATE
        : > Task :patrol:generateDebugResources UP-TO-DATE
        : > Task :patrol:packageDebugResources UP-TO-DATE
        : > Task :app:mapDebugSourceSetPaths UP-TO-DATE
        : > Task :app:generateDebugResources UP-TO-DATE
        : > Task :app:mergeDebugResources UP-TO-DATE
        : > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
        : > Task :app:extractDeepLinksDebug UP-TO-DATE
        : > Task :integration_test:extractDeepLinksDebug UP-TO-DATE
        : > Task :integration_test:processDebugManifest UP-TO-DATE
        : > Task :patrol:extractDeepLinksDebug UP-TO-DATE
        : > Task :patrol:processDebugManifest UP-TO-DATE
        : > Task :app:processDebugMainManifest UP-TO-DATE
        : > Task :app:processDebugManifest UP-TO-DATE
        : > Task :app:processDebugManifestForPackage UP-TO-DATE
        : > Task :integration_test:compileDebugLibraryResources UP-TO-DATE
        : > Task :integration_test:parseDebugLocalResources UP-TO-DATE
        : > Task :integration_test:generateDebugRFile UP-TO-DATE
        : > Task :patrol:compileDebugLibraryResources UP-TO-DATE
        : > Task :patrol:parseDebugLocalResources UP-TO-DATE
        : > Task :patrol:generateDebugRFile UP-TO-DATE
        : > Task :app:processDebugResources UP-TO-DATE
        : > Task :integration_test:generateDebugBuildConfig UP-TO-DATE
        : > Task :integration_test:javaPreCompileDebug UP-TO-DATE
        : > Task :integration_test:compileDebugJavaWithJavac UP-TO-DATE
        : > Task :integration_test:bundleLibCompileToJarDebug UP-TO-DATE
        : > Task :patrol:generateDebugBuildConfig UP-TO-DATE
        : > Task :patrol:compileDebugKotlin UP-TO-DATE
        : > Task :patrol:javaPreCompileDebug UP-TO-DATE
        : > Task :patrol:compileDebugJavaWithJavac UP-TO-DATE
        : > Task :patrol:bundleLibCompileToJarDebug UP-TO-DATE
        : > Task :app:javaPreCompileDebug UP-TO-DATE
        : > Task :app:preDebugAndroidTestBuild SKIPPED
        : > Task :app:compileDebugAndroidTestAidl NO-SOURCE
        : > Task :app:processDebugAndroidTestManifest UP-TO-DATE
        : > Task :app:compileDebugAndroidTestRenderscript NO-SOURCE
        : > Task :app:generateDebugAndroidTestBuildConfig UP-TO-DATE
        : > Task :app:checkDebugAndroidTestAarMetadata UP-TO-DATE
        : > Task :app:generateDebugAndroidTestResValues UP-TO-DATE
        : > Task :app:mapDebugAndroidTestSourceSetPaths UP-TO-DATE
        : > Task :app:generateDebugAndroidTestResources UP-TO-DATE
        : > Task :app:mergeDebugAndroidTestResources UP-TO-DATE
        : > Task :app:processDebugAndroidTestResources UP-TO-DATE
        : > Task :app:javaPreCompileDebugAndroidTest UP-TO-DATE
        : > Task :app:mergeDebugAndroidTestShaders UP-TO-DATE
        : > Task :app:compileDebugAndroidTestShaders NO-SOURCE
        : > Task :app:generateDebugAndroidTestAssets UP-TO-DATE
        : > Task :integration_test:mergeDebugShaders UP-TO-DATE
        : > Task :integration_test:compileDebugShaders NO-SOURCE
        : > Task :integration_test:generateDebugAssets UP-TO-DATE
        : > Task :integration_test:packageDebugAssets UP-TO-DATE
        : > Task :patrol:mergeDebugShaders UP-TO-DATE
        : > Task :patrol:compileDebugShaders NO-SOURCE
        : > Task :patrol:generateDebugAssets UP-TO-DATE
        : > Task :patrol:packageDebugAssets UP-TO-DATE
        : > Task :app:mergeDebugAndroidTestAssets UP-TO-DATE
        : > Task :app:compressDebugAndroidTestAssets UP-TO-DATE
        : > Task :app:processDebugAndroidTestJavaRes NO-SOURCE
        : > Task :integration_test:processDebugJavaRes NO-SOURCE
        : > Task :integration_test:bundleLibResDebug NO-SOURCE
        : > Task :patrol:processDebugJavaRes NO-SOURCE
        : > Task :patrol:bundleLibResDebug UP-TO-DATE
        : > Task :app:mergeDebugAndroidTestJniLibFolders UP-TO-DATE
        : > Task :integration_test:mergeDebugJniLibFolders UP-TO-DATE
        : > Task :integration_test:mergeDebugNativeLibs NO-SOURCE
        : > Task :integration_test:copyDebugJniLibsProjectOnly UP-TO-DATE
        : > Task :patrol:mergeDebugJniLibFolders UP-TO-DATE
        : > Task :patrol:mergeDebugNativeLibs NO-SOURCE
        : > Task :patrol:copyDebugJniLibsProjectOnly UP-TO-DATE
        : > Task :app:mergeDebugAndroidTestNativeLibs NO-SOURCE
        : > Task :app:checkDebugAndroidTestDuplicateClasses UP-TO-DATE
        : > Task :app:desugarDebugAndroidTestFileDependencies UP-TO-DATE
        : > Task :integration_test:bundleLibRuntimeToJarDebug UP-TO-DATE
        : > Task :patrol:bundleLibRuntimeToJarDebug UP-TO-DATE
        : > Task :app:validateSigningDebugAndroidTest UP-TO-DATE
        : > Task :app:writeDebugAndroidTestSigningConfigVersions UP-TO-DATE
        : > Task :app:compileDebugKotlin
        : > Task :app:compileDebugJavaWithJavac UP-TO-DATE
        : > Task :app:bundleDebugClassesToCompileJar UP-TO-DATE
        : > Task :app:compileDebugAndroidTestKotlin NO-SOURCE
        : > Task :app:compileDebugAndroidTestJavaWithJavac UP-TO-DATE
        : > Task :app:mergeDebugAndroidTestJavaResource UP-TO-DATE
        : > Task :app:dexBuilderDebugAndroidTest
        : > Task :app:mergeDexDebugAndroidTest
        : > Task :app:packageDebugAndroidTest UP-TO-DATE
        : > Task :app:createDebugAndroidTestApkListingFileRedirect UP-TO-DATE
        : > Task :app:assembleDebugAndroidTest UP-TO-DATE
        : 
        : BUILD SUCCESSFUL in 1s
        : 73 actionable tasks: 3 executed, 70 up-to-date
✓ Completed building apk with entrypoint test_bundle.dart (3.7s)
• Executing tests of apk with entrypoint test_bundle.dart on device 1C151FDF600AJN...
$ ./gradlew :app:connectedDebugAndroidTest -Ptarget=/Users/lallu/Documents/patrol-master/packages/patrol/hhhh/integration_test/test_bundle.dart -Pdart-defines=UEFUUk9MX1dBSVQ9MA==,UEFUUk9MX0FQUF9QQUNLQUdFX05BTUU9Y29tLnBheXRyb25peC5uZXhnZW5mbA==,UEFUUk9MX0FORFJPSURfQVBQX05BTUU9aGhoaA==,UEFUUk9MX0lPU19BUFBfTkFNRT1oaGho,SU5URUdSQVRJT05fVEVTVF9TSE9VTERfUkVQT1JUX1JFU1VMVFNfVE9fTkFUSVZFPWZhbHNl,UEFUUk9MX1RFU1RfTEFCRUxfRU5BQkxFRD10cnVl
        : > Task :app:compileFlutterBuildDebug UP-TO-DATE
        : > Task :app:packLibsflutterBuildDebug UP-TO-DATE
        : > Task :app:preBuild UP-TO-DATE
        : > Task :app:preDebugBuild UP-TO-DATE
        : > Task :integration_test:preBuild UP-TO-DATE
        : > Task :integration_test:preDebugBuild UP-TO-DATE
        : > Task :integration_test:compileDebugAidl NO-SOURCE
        : > Task :patrol:preBuild UP-TO-DATE
        : > Task :patrol:preDebugBuild UP-TO-DATE
        : > Task :patrol:compileDebugAidl NO-SOURCE
        : > Task :app:compileDebugAidl NO-SOURCE
        : > Task :integration_test:packageDebugRenderscript NO-SOURCE
        : > Task :patrol:packageDebugRenderscript NO-SOURCE
        : > Task :app:compileDebugRenderscript NO-SOURCE
        : > Task :app:generateDebugBuildConfig UP-TO-DATE
        : > Task :integration_test:writeDebugAarMetadata UP-TO-DATE
        : > Task :patrol:writeDebugAarMetadata UP-TO-DATE
        : > Task :app:checkDebugAarMetadata UP-TO-DATE
        : > Task :app:cleanMergeDebugAssets
        : > Task :app:mergeDebugShaders UP-TO-DATE
        : > Task :app:compileDebugShaders NO-SOURCE
        : > Task :app:generateDebugAssets UP-TO-DATE
        : > Task :integration_test:mergeDebugShaders UP-TO-DATE
        : > Task :integration_test:compileDebugShaders NO-SOURCE
        : > Task :integration_test:generateDebugAssets UP-TO-DATE
        : > Task :integration_test:packageDebugAssets UP-TO-DATE
        : > Task :patrol:mergeDebugShaders UP-TO-DATE
        : > Task :patrol:compileDebugShaders NO-SOURCE
        : > Task :patrol:generateDebugAssets UP-TO-DATE
        : > Task :patrol:packageDebugAssets UP-TO-DATE
        : > Task :app:mergeDebugAssets
        : > Task :app:copyFlutterAssetsDebug
        : > Task :app:generateDebugResValues UP-TO-DATE
        : > Task :integration_test:compileDebugRenderscript NO-SOURCE
        : > Task :integration_test:generateDebugResValues UP-TO-DATE
        : > Task :integration_test:generateDebugResources UP-TO-DATE
        : > Task :integration_test:packageDebugResources UP-TO-DATE
        : > Task :patrol:compileDebugRenderscript NO-SOURCE
        : > Task :patrol:generateDebugResValues UP-TO-DATE
        : > Task :patrol:generateDebugResources UP-TO-DATE
        : > Task :patrol:packageDebugResources UP-TO-DATE
        : > Task :app:mapDebugSourceSetPaths UP-TO-DATE
        : > Task :app:generateDebugResources UP-TO-DATE
        : > Task :app:mergeDebugResources UP-TO-DATE
        : > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
        : > Task :app:extractDeepLinksDebug UP-TO-DATE
        : > Task :integration_test:extractDeepLinksDebug UP-TO-DATE
        : > Task :integration_test:processDebugManifest UP-TO-DATE
        : > Task :patrol:extractDeepLinksDebug UP-TO-DATE
        : > Task :patrol:processDebugManifest UP-TO-DATE
        : > Task :app:processDebugMainManifest UP-TO-DATE
        : > Task :app:processDebugManifest UP-TO-DATE
        : > Task :app:processDebugManifestForPackage UP-TO-DATE
        : > Task :integration_test:compileDebugLibraryResources UP-TO-DATE
        : > Task :integration_test:parseDebugLocalResources UP-TO-DATE
        : > Task :integration_test:generateDebugRFile UP-TO-DATE
        : > Task :patrol:compileDebugLibraryResources UP-TO-DATE
        : > Task :patrol:parseDebugLocalResources UP-TO-DATE
        : > Task :patrol:generateDebugRFile UP-TO-DATE
        : > Task :app:processDebugResources UP-TO-DATE
        : > Task :integration_test:generateDebugBuildConfig UP-TO-DATE
        : > Task :integration_test:javaPreCompileDebug UP-TO-DATE
        : > Task :integration_test:compileDebugJavaWithJavac UP-TO-DATE
        : > Task :integration_test:bundleLibCompileToJarDebug UP-TO-DATE
        : > Task :patrol:generateDebugBuildConfig UP-TO-DATE
        : > Task :patrol:compileDebugKotlin UP-TO-DATE
        : > Task :patrol:javaPreCompileDebug UP-TO-DATE
        : > Task :patrol:compileDebugJavaWithJavac UP-TO-DATE
        : > Task :patrol:bundleLibCompileToJarDebug UP-TO-DATE
        : > Task :app:javaPreCompileDebug UP-TO-DATE
        : > Task :app:preDebugAndroidTestBuild SKIPPED
        : > Task :app:compileDebugAndroidTestAidl NO-SOURCE
        : > Task :app:processDebugAndroidTestManifest UP-TO-DATE
        : > Task :app:compileDebugAndroidTestRenderscript NO-SOURCE
        : > Task :app:generateDebugAndroidTestBuildConfig UP-TO-DATE
        : > Task :app:checkDebugAndroidTestAarMetadata UP-TO-DATE
        : > Task :app:generateDebugAndroidTestResValues UP-TO-DATE
        : > Task :app:mapDebugAndroidTestSourceSetPaths UP-TO-DATE
        : > Task :app:generateDebugAndroidTestResources UP-TO-DATE
        : > Task :app:mergeDebugAndroidTestResources UP-TO-DATE
        : > Task :app:processDebugAndroidTestResources UP-TO-DATE
        : > Task :app:javaPreCompileDebugAndroidTest UP-TO-DATE
        : > Task :app:compressDebugAssets UP-TO-DATE
        : > Task :app:processDebugJavaRes NO-SOURCE
        : > Task :integration_test:processDebugJavaRes NO-SOURCE
        : > Task :integration_test:bundleLibResDebug NO-SOURCE
        : > Task :patrol:processDebugJavaRes NO-SOURCE
        : > Task :patrol:bundleLibResDebug UP-TO-DATE
        : > Task :app:checkDebugDuplicateClasses UP-TO-DATE
        : > Task :app:desugarDebugFileDependencies UP-TO-DATE
        : > Task :patrol:bundleLibRuntimeToJarDebug UP-TO-DATE
        : > Task :integration_test:bundleLibRuntimeToJarDebug UP-TO-DATE
        : > Task :app:mergeDebugJniLibFolders UP-TO-DATE
        : > Task :integration_test:mergeDebugJniLibFolders UP-TO-DATE
        : > Task :integration_test:mergeDebugNativeLibs NO-SOURCE
        : > Task :integration_test:copyDebugJniLibsProjectOnly UP-TO-DATE
        : > Task :patrol:mergeDebugJniLibFolders UP-TO-DATE
        : > Task :patrol:mergeDebugNativeLibs NO-SOURCE
        : > Task :patrol:copyDebugJniLibsProjectOnly UP-TO-DATE
        : > Task :app:mergeDebugNativeLibs UP-TO-DATE
        : > Task :app:stripDebugDebugSymbols UP-TO-DATE
        : > Task :app:validateSigningDebug UP-TO-DATE
        : > Task :app:writeDebugAppMetadata UP-TO-DATE
        : > Task :app:writeDebugSigningConfigVersions UP-TO-DATE
        : > Task :app:mergeDebugAndroidTestShaders UP-TO-DATE
        : > Task :app:compileDebugAndroidTestShaders NO-SOURCE
        : > Task :app:generateDebugAndroidTestAssets UP-TO-DATE
        : > Task :app:mergeDebugAndroidTestAssets UP-TO-DATE
        : > Task :app:compressDebugAndroidTestAssets UP-TO-DATE
        : > Task :app:processDebugAndroidTestJavaRes NO-SOURCE
        : > Task :app:mergeDebugAndroidTestJniLibFolders UP-TO-DATE
        : > Task :app:mergeDebugAndroidTestNativeLibs NO-SOURCE
        : > Task :app:checkDebugAndroidTestDuplicateClasses UP-TO-DATE
        : > Task :app:desugarDebugAndroidTestFileDependencies UP-TO-DATE
        : > Task :app:validateSigningDebugAndroidTest UP-TO-DATE
        : > Task :app:writeDebugAndroidTestSigningConfigVersions UP-TO-DATE
        : > Task :app:compileDebugKotlin
        : > Task :app:compileDebugJavaWithJavac UP-TO-DATE
        : > Task :app:bundleDebugClassesToCompileJar UP-TO-DATE
        : > Task :app:compileDebugAndroidTestKotlin NO-SOURCE
        : > Task :app:compileDebugAndroidTestJavaWithJavac UP-TO-DATE
        : > Task :app:mergeDebugJavaResource UP-TO-DATE
        : > Task :app:dexBuilderDebug UP-TO-DATE
        : > Task :app:mergeDexDebug UP-TO-DATE
        : > Task :app:packageDebug UP-TO-DATE
        : > Task :app:createDebugApkListingFileRedirect UP-TO-DATE
        : > Task :app:mergeDebugAndroidTestJavaResource UP-TO-DATE
        : > Task :app:dexBuilderDebugAndroidTest
        : > Task :app:mergeDexDebugAndroidTest
        : > Task :app:packageDebugAndroidTest UP-TO-DATE
        : > Task :app:createDebugAndroidTestApkListingFileRedirect UP-TO-DATE
        : > Task :app:connectedDebugAndroidTest
        : 
        : BUILD SUCCESSFUL in 2s
        : 94 actionable tasks: 7 executed, 87 up-to-date
✓ Completed executing apk with entrypoint test_bundle.dart on device 1C151FDF600AJN (2.8s)
Uninstalling com.paytronix.nexgenfl from Pixel 6
Uninstalling com.paytronix.nexgenfl.test from Pixel 6
 PASS  test_bundle.dart on 1C151FDF600AJN

@lravihs
Copy link
Author

lravihs commented Jun 29, 2023

app/build.gradle

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
namespace "com.example.hhhh"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
    jvmTarget = '1.8'
}

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.hhhh"
    // You can update the following values to match your application needs.
    // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
    minSdkVersion 19
    targetSdkVersion flutter.targetSdkVersion
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    testInstrumentationRunner "pl.leancode.patrol.PatrolJUnitRunner"
    testInstrumentationRunnerArguments clearPackageData: "true"
    multiDexEnabled true
}

testOptions {
    execution "ANDROIDX_TEST_ORCHESTRATOR"
}

buildTypes {
    release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        signingConfig signingConfigs.debug
    }
}

}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
androidTestUtil "androidx.test:orchestrator:1.4.2"
}

@lravihs
Copy link
Author

lravihs commented Jun 29, 2023

command I am executing

patrol test --target integration_test/example_test.dart

patrol develop --target integration_test/example_test.dart

@bartekpacia
Copy link
Contributor

Thanks a lot again. Your app has a flavor defined, and previously you called the command patrol test -d emulator-5554 --flavor jk integration_test/app_test.dart. Please share its output.

It's important to define flavor correctly.

@lravihs
Copy link
Author

lravihs commented Jun 29, 2023

I have done that by adding flavor in my application, even i check with the flutter demo application. The tests are executing, completing and getting passed but its doing in background, not doing on device or simulator

@lravihs
Copy link
Author

lravihs commented Jun 29, 2023

If I run with iOS I am facing different issue even I have mentioned above

@bartekpacia
Copy link
Contributor

If I run with iOS I am facing different issue even I have mentioned above

If you mean this - it's probably because you're not signed in into Xcode.

@bartekpacia
Copy link
Contributor

Sorry but at this point I have no more ideas what might be wrong with your setup. I have to ask you to provide a minimal, reproducible sample so I can debug it locally. Ideally, create a new repo that I can just git clone.

Patrol 2.0 is used extensively at my company and we don't have such problems. I'm pretty sure it's a setup issue.

@lravihs
Copy link
Author

lravihs commented Jun 29, 2023

Okay we can check with the demo project setup which I have done

@lravihs
Copy link
Author

lravihs commented Jun 29, 2023

Can I send you the flutter demo project compressed file that I have integrated patrol. If yes please provide me your email id

@bartekpacia
Copy link
Contributor

[email protected]

@bartekpacia
Copy link
Contributor

Hi @lravihs, thank you for sending me the code.

The problem is with your setup. Specifically, you put MainActivityTest.java in the wrong location.: android/app/src/main/java/MainActivityTest.java. The correct location in your case is android/app/src/androidTest/java/com/example/hhhh/MainActivityTest.java.

@lravihs
Copy link
Author

lravihs commented Jul 3, 2023

Thanks a lot @bartekpacia , the issues in android were cleared but I am getting this issue if I run on iOS device or simulator. Can you please help me in this.?

lallu@Laliths-MacBook-Pro Next-Gen-App % patrol test --target integration_test/example_test.dart --flavor jk
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 (iPhone 14 Pro)
• Building app with entrypoint test_bundle.dart for iOS simulator (debug)...
2023-07-03 12:43:55.930 xcodebuild[34386:282756] DVTPortal: Service '<DVTPortalViewDeveloperService: 0x600001d94980; action='viewDeveloper'>' encountered an unexpected result code from the portal ('1100')
2023-07-03 12:43:55.930 xcodebuild[34386:282756] DVTPortal: Error:
Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={
creationTimestamp = "2023-07-03T07:13:56Z";
httpCode = 200;
protocolVersion = QH65B2;
requestUrl = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action";
responseId = "c5cb774a-5e28-4a2d-8074-b4b8d333a0cb";
resultCode = 1100;
resultString = "Your session has expired. Please log in.";
userLocale = "en_US";
userString = "Your session has expired. Please log in.";
}, NSLocalizedDescription=Your session has expired. Please log in.}

@bartekpacia
Copy link
Contributor

This is a separate issue, so please create a new one.

Also, check this: #1416 (comment)

@lravihs
Copy link
Author

lravihs commented Jul 3, 2023

OKAY

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants