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

[tizen_app_control] Integration test is failing #272

Closed
seungsoo47 opened this issue Nov 9, 2021 · 9 comments · Fixed by #293
Closed

[tizen_app_control] Integration test is failing #272

seungsoo47 opened this issue Nov 9, 2021 · 9 comments · Fixed by #293
Labels
bug Something isn't working

Comments

@seungsoo47
Copy link
Contributor

@swift-kim Integration test for tizen_app_control is failing like following. Could you check the problems?

$ ./tools/run_command.py test --plugins tizen_app_control --platforms mobile-6.5
============= Testing for tizen_app_control (1/1) =============

00:00 +0: loading /tmp/flutter_tools.KGWRDJ/KLIKGX/tizen_app_control_test.dart Building a Tizen application in debug mode...
The project type of messageport_tizen plugin is "sharedLib", which is deprecated in favor of "staticLib".

00:21 +0: loading /tmp/flutter_tools.KGWRDJ/KLIKGX/tizen_app_control_test.dart
00:22 +0: loading /tmp/flutter_tools.KGWRDJ/KLIKGX/tizen_app_control_test.dart The public profile is used for signing.

00:34 +0: loading /tmp/flutter_tools.KGWRDJ/KLIKGX/tizen_app_control_test.dart
00:35 +0: loading /tmp/flutter_tools.KGWRDJ/KLIKGX/tizen_app_control_test.dart Building a Tizen application in debug mode... 36.3s
✓ Built build/tizen/tpk/org.tizen.tizen_app_control_example-1.0.0.tpk (26.5MB).

00:37 +0: loading /tmp/flutter_tools.KGWRDJ/KLIKGX/tizen_app_control_test.dart Installing build/tizen/tpk/org.tizen.tizen_app_control_example-1.0.0.tpk...
01:03 +0: loading /tmp/flutter_tools.KGWRDJ/KLIKGX/tizen_app_control_test.dart
01:04 +0: loading /tmp/flutter_tools.KGWRDJ/KLIKGX/tizen_app_control_test.dart 27.0s

01:09 +0: loading /tmp/flutter_tools.KGWRDJ/KLIKGX/tizen_app_control_test.dart
01:11 +1: Can receive request from platform
01:11 +2: Can find matching applications
01:11 +3: Can send and receive request
01:11 +4: Omit invalid extra data
01:22 +4: Can send and receive reply
01:22 +4 -1: Can send and receive reply [E]
TimeoutException after 0:00:10.000000: Test timed out after 10 seconds.
dart:isolate _RawReceivePortImpl._handleMessage

01:22 +5 -1: Cannot find target applications
01:23 +5 -1: Can terminate service application
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following TestFailure object was thrown running a test:
Expected: false
Actual:

When the exception was thrown, this was the stack:
#4 main. (file:///home/leess/11_HDD/01_SRC/2020_Flutter/github/plugins/packages/tizen_app_control/example/integration_test/tizen_app_control_test.dart:111:5)
#5 main. (file:///home/leess/11_HDD/01_SRC/2020_Flutter/github/plugins/packages/tizen_app_control/example/integration_test/tizen_app_control_test.dart:110:52)
#6 testWidgets.. (package:flutter_test/src/widget_tester.dart:176:29)


(elided one frame from package:stack_trace)

This was caught by the test expectation on the following line:
file:///home/leess/11_HDD/01_SRC/2020_Flutter/github/plugins/packages/tizen_app_control/example/integration_test/tizen_app_control_test.dart line 111
The test description was:
Can terminate service application
════════════════════════════════════════════════════════════════════════════════════════════════════

01:23 +5 -2: Can terminate service application [E]
Test failed. See exception logs above.
The test description was: Can terminate service application

01:24 +5 -2: (tearDownAll)
01:24 +5 -2: Some tests failed.
============= TEST RESULT =============
FAILED: tizen_app_control ('mobile-6.5', 'TM1', '0000d82c00006200')
flutter-tizen test integration_test failed, see the output above for details.
Some tests failed.

@swift-kim
Copy link
Member

It's a known issue and for this reason tizen_app_control is being excluded from CI integration testing.

google_maps_flutter tizen_app_control url_launcher network_info_plus

The issue will not be fixed due to the fundamental limitation of flutter-tizen's test command. You can use the drive command to run the integration test instead.

@HakkyuKim By the way, why do we manage two separate lists of packages to include/exclude packages to/from integration testing? Can we use only one?

@HakkyuKim
Copy link
Contributor

HakkyuKim commented Nov 10, 2021

@swift-kim
The recipe file does not include/exclude plugins to test, it specifies which target platforms to test on and the tool refers to the file to create specific emulator profiles and Tizen versions.

group.add_argument('--recipe',
type=str,
default='',
help='''The recipe file path. A recipe refers to a
yaml file that defines a list of target platforms to test for each plugin.
Pass this file if you want to select specific target platform for different
plugins. Note that recipe does not select which plugins to test(that is covered
by the --plugins option), it only defines which target platform to test
for certain plugins if those plugins are being tested.
(
plugins:
a: [wearable-5.5, tv-6.0]
b: [mobile-6.0]
c: [wearable-4.0]
)''')

A similar proposal was made by @bbrto21 here, I haven't got a chance to work on it yet. When I do, I'll design towards listing all info in recipe.

@swift-kim
Copy link
Member

@HakkyuKim But omitting a package or providing an empty list for a package in the recipe file effectively does the same thing as the --exclude option, right? I was thinking of eliminating this redundancy.

@swift-kim
Copy link
Member

I read your comment about an empty list in the recipe file but I think you need to be more explicit about the "non specified" case if you really need it. For example, the following syntax may be used.

plugins:
  audioplayers: any
  battery_plus: []
  camera: ["mobile-6.0"]

@HakkyuKim
Copy link
Contributor

The "non-specified" case(empty list) doesn't have any practical meaning at this point, I remembered that I copied the entries from device limitation table. At the time I wanted to point out that plugins with empty list cannot be tested on emulators, but I guess we're already filtering those out in the CI script.
We could just remove the entries with empty list, the result would be the same:

// recipe.yaml:
// plugins:
//   battery_plus: []

./tools/run_command.py test --plugins battery_plus --recipe recipe.yaml
FAILED: battery_plus 
Cannot find any testable targets.
Some tests failed.

// recipe.yaml:
// plugins:
//   nothing:

./tools/run_command.py test --plugins battery_plus --recipe recipe.yaml
FAILED: battery_plus 
Cannot find any testable targets.
Some tests failed.

@swift-kim
Copy link
Member

@HakkyuKim I don't quite get what you want to say.

@HakkyuKim
Copy link
Contributor

@swift-kim

By the way, why do we manage two separate lists of packages to include/exclude packages to/from integration testing? Can we use only one?

Right now, no because

But omitting a package or providing an empty list for a package in the recipe file effectively does the same thing as the --exclude option, right? I was thinking of eliminating this redundancy.

is not true.

# recipe.yaml
plugins:
  battery_plus: ["wearable-5.5"]
  camera: []
  device_info_plus: []
./tools/run_command.py test --exclude device_info_plus --recipe recipe.yaml

means:

  • test battery_plus on wearable-5.5 emulator. -> ok
  • test camera on None. -> error because no testing platforms are given.
  • exclude device_info_plus -> ok because intentionally exclude testing. (The tool will not look for the entry in recipe.yaml)

I haven't got a chance to work on it yet. When I do, I'll design towards listing all info in recipe.

Meant that maybe later recipe file can support something like:

# recipe.yaml
plugins:
  battery_plus: ["wearable-5.5"]
  camera: []
  device_info_plus: exclude

As for now, we can remove all empty list entries in the recipe file because we're specifying them with --exclude(Not because empty list will exclude them from tests but because the tool will not look for the entry in recipe.yaml).

Does this answer your question?

@swift-kim
Copy link
Member

Meant that maybe later ...

I know the current status. What we're talking about here is that "later" design and I wanted to hear your opinion on my suggestion.

@HakkyuKim
Copy link
Contributor

@swift-kim and I talked about the subject on company chat and concluded that it's simpler to just not have empty list/any. I'll remove them from recipe.yaml.

@swift-kim swift-kim linked a pull request Dec 7, 2021 that will close this issue
@swift-kim swift-kim added the bug Something isn't working label Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants