[Question] It's possible to run the tests without building the main project each time?
joaofyz opened this issue · 2 comments
First of all congratulations for developing and maintaining this project.
We are using the 3.0.0_RC_17 version and accordingly with the README file on that version we are using the following commands to run the tests:
# generate the test suite
flutter pub run build_runner build --delete-conflicting-outputs
# re-generate
flutter pub run build_runner clean
flutter pub run build_runner build --delete-conflicting-outputs
# run the tests
flutter drive --driver=test_driver/integration_test_driver.dart --target=integration_test/gherkin_suite_test.dart
My question is if we always need to make a new build of the project after each change? There's now way to only build the tests, once the main project code didn't changed?
Thanks and continue the good work 👍
@joaofyz I don't think so. I have never investigated this. I think the way the dart build runner works it is operates on the project as a whole unfortunately.
@joaofyz This solution works well:
#177 (comment)
1- You need to delete the generated test file from the build_runner's cache: .dart_tool/build/generated/your_project_folder/integration_test/gherkin_suite_test.gherkin_tests.g.part
2- Then, you can run the following command:
flutter pub run build_runner build --delete-conflicting-outputs
Deleting the file from cache will force the build_runner to generate a new version of the test file instead of retrieving it from cache.