very_good_workflows icon indicating copy to clipboard operation
very_good_workflows copied to clipboard

fix: test output might be lost

Open jorgecoca opened this issue 2 years ago • 0 comments

Description

While running flutter test locally produces this output:

❯ flutter test
Running "flutter pub get" in recipes_repository...               1,415ms
00:03 +5 -1: RecipesRepository getRandomCocktail provides expected cocktail [E]
  Expected: Cocktail:<Cocktail(strMeal, strMealThumb, [Ingredient(strIngredient1, strMeasure1), Ingredient(strIngredient2, strMeasure2), Ingredient(strIngredient3, strMeasure3), Ingredient(strIngredient4, strMeasure4), Ingredient(strIngredient5, strMeasure5), Ingredient(strIngredient6, strMeasure6), Ingredient(strIngredient7, strMeasure7), Ingredient(strIngredient8, strMeasure8), Ingredient(strIngredient9, strMeasure9), Ingredient(strIngredient10, strMeasure10), Ingredient(strIngredient11, strMeasure11), Ingredient(strIngredient12, strMeasure12), Ingredient(strIngredient13, strMeasure13), Ingredient(strIngredient14, strMeasure14), Ingredient(strIngredient15, strMeasure15), Ingredient(strIngredient16, strMeasure16), Ingredient(strIngredient17, strMeasure17), Ingredient(strIngredient18, strMeasure18), Ingredient(strIngredient19, strMeasure19), Ingredient(strIngredient20, strMeasure20)])>
    Actual: Recipe:<Recipe(strMeal, strMealThumb, [Ingredient(strIngredient1, strMeasure1), Ingredient(strIngredient2, strMeasure2), Ingredient(strIngredient3, strMeasure3), Ingredient(strIngredient4, strMeasure4), Ingredient(strIngredient5, strMeasure5), Ingredient(strIngredient6, strMeasure6), Ingredient(strIngredient7, strMeasure7), Ingredient(strIngredient8, strMeasure8), Ingredient(strIngredient9, strMeasure9), Ingredient(strIngredient10, strMeasure10), Ingredient(strIngredient11, strMeasure11), Ingredient(strIngredient12, strMeasure12), Ingredient(strIngredient13, strMeasure13), Ingredient(strIngredient14, strMeasure14), Ingredient(strIngredient15, strMeasure15), Ingredient(strIngredient16, strMeasure16), Ingredient(strIngredient17, strMeasure17), Ingredient(strIngredient18, strMeasure18), Ingredient(strIngredient19, strMeasure19), Ingredient(strIngredient20, strMeasure20)])>

  package:test_api                            expect
  test/src/recipes_repository_test.dart 99:9  main.<fn>.<fn>.<fn>

00:04 +7 -2: RecipesRepository getRandomRecipe provides expected recipe [E]
  Expected: Cocktail:<Cocktail(strDrink, strDrinkThumb, [Ingredient(strIngredient1, strMeasure1), Ingredient(strIngredient2, strMeasure2), Ingredient(strIngredient3, strMeasure3), Ingredient(strIngredient4, strMeasure4), Ingredient(strIngredient5, strMeasure5), Ingredient(strIngredient6, strMeasure6), Ingredient(strIngredient7, strMeasure7), Ingredient(strIngredient8, strMeasure8), Ingredient(strIngredient9, strMeasure9), Ingredient(strIngredient10, strMeasure10), Ingredient(strIngredient11, strMeasure11), Ingredient(strIngredient12, strMeasure12), Ingredient(strIngredient13, strMeasure13), Ingredient(strIngredient14, strMeasure14), Ingredient(strIngredient15, strMeasure15)])>
    Actual: Recipe:<Recipe(strMeal, strMealThumb, [Ingredient(strIngredient1, strMeasure1), Ingredient(strIngredient2, strMeasure2), Ingredient(strIngredient3, strMeasure3), Ingredient(strIngredient4, strMeasure4), Ingredient(strIngredient5, strMeasure5), Ingredient(strIngredient6, strMeasure6), Ingredient(strIngredient7, strMeasure7), Ingredient(strIngredient8, strMeasure8), Ingredient(strIngredient9, strMeasure9), Ingredient(strIngredient10, strMeasure10), Ingredient(strIngredient11, strMeasure11), Ingredient(strIngredient12, strMeasure12), Ingredient(strIngredient13, strMeasure13), Ingredient(strIngredient14, strMeasure14), Ingredient(strIngredient15, strMeasure15), Ingredient(strIngredient16, strMeasure16), Ingredient(strIngredient17, strMeasure17), Ingredient(strIngredient18, strMeasure18), Ingredient(strIngredient19, strMeasure19), Ingredient(strIngredient20, strMeasure20)])>

  package:test_api                             expect
  test/src/recipes_repository_test.dart 142:9  main.<fn>.<fn>.<fn>

00:04 +7 -2: Some tests failed.

in CI, using very_good_workflows, produces this other output without the details:

Run pub global activate test_coverage
[9](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:9)
Resolving dependencies...
[10](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:10)
+ args 1.6.0 (2.3.0 available)
[11](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:11)
+ async 2.8.2
[12](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:12)
+ charcode 1.3.1
[13](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:13)
+ clock 1.1.0
[14](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:14)
+ collection 1.16.0
[15](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:15)
+ coverage 0.14.2 (1.2.0 available)
[16](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:16)
+ file 5.2.1 (6.1.2 available)
[17](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:17)
+ glob 1.2.0 (2.0.2 available)
[18](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:18)
+ intl 0.17.0
[19](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:19)
+ js 0.6.4
[20](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:20)
+ json_annotation 3.1.1 (4.4.0 available)
[21](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:21)
+ lcov 5.7.0 (6.0.0 available)
[22](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:22)
+ logging 0.11.4 (1.0.2 available)
[23](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:23)
+ meta 1.7.0
[24](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:24)
+ node_interop 1.2.1 (2.1.0 available)
[25](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:25)
+ node_io 1.2.0 (2.1.0 available)
[26](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:26)
+ package_config 1.9.3 (2.0.2 available)
[27](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:27)
+ path 1.8.1
[28](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:28)
+ pedantic 1.11.1
[29](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:29)
+ source_maps 0.10.10
[30](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:30)
+ source_span 1.8.2
[31](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:31)
+ stack_trace 1.10.0
[32](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:32)
+ string_scanner 1.1.0
[33](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:33)
+ term_glyph 1.2.0
[34](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:34)
+ test_coverage 0.5.0
[35](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:35)
+ vm_service 5.5.0 (8.2.2 available)
[36](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:36)
Downloading test_coverage 0.5.0...
[37](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:37)
Downloading glob 1.2.0...
[38](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:38)
Downloading coverage 0.14.2...
[39](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:39)
Downloading package_config 1.9.3...
[40](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:40)
Downloading lcov 5.7.0...
[41](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:41)
Downloading json_annotation 3.1.1...
[42](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:42)
Downloading args 1.6.0...
[43](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:43)
Downloading node_io 1.2.0...
[44](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:44)
Downloading node_interop 1.2.1...
[45](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:45)
Downloading logging 0.11.4...
[46](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:46)
Downloading file 5.2.1...
[47](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:47)
Downloading intl 0.17.0...
[48](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:48)
Downloading clock 1.1.0...
[49](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:49)
Downloading pedantic 1.11.1...
[50](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:50)
Downloading vm_service 5.5.0...
[51](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:51)
Building package executables...
[52](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:52)
Built test_coverage:test_coverage.
[53](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:53)
Installed executable test_coverage.
[54](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:54)
Activated test_coverage 0.5.0.
[55](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:55)
Found 1 test files.
[56](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:56)
Generated test-all script in test/.test_coverage.dart. Please make sure it is added to .gitignore.
[57](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:57)
Unhandled exception:
[58](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:58)
Tests failed with exit code 255
[59](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:59)
#0      runTestsAndCollect (package:test_coverage/src/functions.dart:122:5)
[60](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:60)
<asynchronous suspension>
[61](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:61)
#1      main (file:///home/runner/.pub-cache/hosted/pub.dartlang.org/test_coverage-0.5.0/bin/test_coverage.dart:60:3)
[62](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:62)
<asynchronous suspension>
[63](https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true#step:7:63)
Error: Process completed with exit code 255.

Link to the build: https://github.com/VGVentures/mealify/runs/5737269551?check_suite_focus=true

Expected Behavior Local and CI produce the same feedback.

jorgecoca avatar Mar 29 '22 13:03 jorgecoca