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

Error with log output when lunch the tests over web #172

Closed
jamontes79 opened this issue Nov 15, 2021 · 7 comments
Closed

Error with log output when lunch the tests over web #172

jamontes79 opened this issue Nov 15, 2021 · 7 comments

Comments

@jamontes79
Copy link

Using flutter_gherkin 3.0.0-rc.7 the log output throws an exception using Android Studio + macOs

integration_test_driver.dart
`
import 'package:integration_test/integration_test_driver.dart'
as integration_test_driver;

Future main() {
// The Gherkin report data send back to this runner by the app after
// the tests have run will be saved to this directory
integration_test_driver.testOutputsDirectory =
'integration_test/gherkin/reports';

return integration_test_driver.integrationDriver(
timeout: Duration(minutes: 90),
);
}
`

gherkin_suite_test.dart
`
part 'gherkin_suite_test.g.dart';

@GherkinTestSuite()
void main() {
executeTestSuite(
FlutterTestConfiguration.DEFAULT(
[

],
)
..reporters = [
ProgressReporter()
..setWriteLineFn(print)
..setWriteFn(print),
TestRunSummaryReporter()
..setWriteLineFn(print)
..setWriteFn(print),
JsonReporter(
writeReport: (_, __) => Future.value(),
),
],
(World world) async {
await getIt.reset();
app.main();
},
);
}
`

Output with version 3.0.0-rc.6:
version6

Output with version 3.0.0-rc.7:
version7

Thanks a lot in advance

@jonsamwell
Copy link
Owner

Looks like the StdoutReporter can't be supported on the web now - I added a check to see if ANSI code are supported due to #155. You could try running it and removing that report from the reporters config? I think the best option would be to catch this error in the stdout reporter though. I'll try and get a fix in tomorrow

@jamontes79
Copy link
Author

Thanks a lot, I'll try it and I give you feedback. :)

@bluego-joe
Copy link

I am experiencing this issue also. Removing the reporters solves the problem, but means that you can't see any test output. Needless to say, this makes debugging tricky :)

@jonsamwell
Copy link
Owner

Should be fixed in v3.0.0-rc.9

@bluego-joe
Copy link

Thanks for the update - working well for me :)

@jonsamwell
Copy link
Owner

great

@jamontes79
Copy link
Author

Working like a charm... thanks a lot for the quickly fix.

Great job and great library! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants