-
Notifications
You must be signed in to change notification settings - Fork 11
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
gradle discrepancies #33
Comments
i can't test the deployment, so i hope that i didn't broke something |
Just published the new version, feel free to test |
@wakaleo thank you the cache doesn't work as expected. I'm afraid that we have to use the complete outputDirectory from test.
but the generated report is empty, because the test-results are missing |
c7e0310 was an undo of #19, but 3424830 makes a redo, but with differences currently i'm afraid that's not possible to make a consistent result, if you test without aggegate ( i have a plan in mind, but need some time to implement and test |
Thanks for clarifying. As for Aside of these issues, #19 was a welcome improvement 👍. |
assuming the gradle-plugin should work like the maven-plugin, as outlined in serenity-bdd/serenity-maven-plugin#22 (comment) you have to set a common output-directory in all subprojects, to get one report for all subproject tests, correct? |
Solved reports generation issue in a muli-module project with v 4.1.10 (happens on RH UBI, e.g. linux, not on Mac though...) on my side.
The both configured outputDirectory s must point to the same location- otherwise JSON reports are not picked up for further processing, not sure why.... Solution:
Gradle then takes into account that there could be some other output, besides aggregate's one, and doesn't delete the entire build/site/serenity directory- aggregate picks JSONs up and produces HTML report. P.S. thanks to @tnielens - yes i forgot to mention that this setup is not recommended by gradle - but I currently I don't see any other way to generate reports- it doesn't work otherwise... |
Gradle incremental build and task cache (to be distinguished from the configuration cache) don't work reliably if multiple tasks output results in the same directory. You'll see warnings in the log about this. |
we can copy the test-result-files to a aggregate-working directory to split the test-output from the aggregate output - but this would be a breaking change |
I'm reverting all of these changes as they have caused a number of regressions. |
wich ones? |
we should found a way to go with configuration cache |
#30 was included in the code base. I will roll it all back and you are welcome to redo the PRs, but we need an up to date sample project as the Gradle unit tests don't pick up all the issues. |
would be nice to run tests before merged |
To run the full test suite you need to publish the plugin - if you can find a way to run end-to-end tests with the Gradle plugin without needing to publish it that could work better. |
that's that the tests currently do, no need to be published previuosly |
There are unit tests, but since Groovy is a dynamic language they don't pick up all the issues, which only appear when you run the plugin against a real project. If you know how to write local end-to-end tests that do pick up these issues that would be a great help. |
could github run these tests on PR as an action? |
No, because if you run them against a project separately, you need to publish the plugin first which can only be done by hand. (We do run the Gradle unit tests for each build, but they are not sufficient). |
@wakaleo gradle has great support for e2e tests (they call it functional tests). Doesn't this suite fulfill your requirements? |
currently tests are insufficient: accepted |
No it does not. We get lots of errors appearing when we actually try the tests out on a real project that don't appear in these tests. |
Can you propose a PR on the Github actions to do this? |
The current test coverage in the project is gappy. We can add a lot more test cases. The multi module test suite was added to cover a particular failure scenario. |
i'm not familiar with github actions, will take a look, will need time, maybe someone is faster ;) |
More tests would be very welcome. |
#19 added several tests which were reverted unfortunately. I suppose they can be reapplied without the main code patch easily. |
For github actions, here is some doc by gradle: https://docs.gradle.org/current/userguide/github-actions.html#sec:configure_github_actions . I'll try that out. |
There was a workflow already in place, but it didn't run on PR: #35 . |
it works, the tests failed:
|
@zeners see the comments in the PR. The current master revision is broken it seems. The plugin cannot register certain tasks. |
that have been fixed and is now rolled back? |
@wakaleo patched master. The tests now pass. |
so we have now a working master and checked test on PR: thanks! |
@tnielens i would like to resubmit, after having tests for the issues, but it will take some time (may be at weekend) |
for my understanding, did any of your changes concern the configuration cache? |
No |
@tnielens any news/progress? |
i found the following needed actions, please correct me, if i'm wrong
clearHistory
andhistory
as mentioned by @petrandreevbuild.gradle
should usetasks.register
build.gradle
useJUnitPlatform()
to run the testsassertThat(...).contains(...);
(currentlyassertThat(....contains(...));
i tested the actions with a simple test-project and with active
--build-cache --configuration-cache
getting the following result:
clean test
without change: create empty resulttest
after change: create index with no results pages listed (afterclean test
)this looks like test create output, that aggregate uses without the knowledge of gradle-cache
gradle writes output into build, serenity into target/site/serenity,
clean
only remove serenity inside target/siteThe text was updated successfully, but these errors were encountered: