question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gradle plugin: Running tests with gradle may not start test on second time

See original GitHub issue

The environment Gatling 3.5.1. Win10. Running from gradle plugin. I have tried from Windows CMD and Git Bash.

The steps

  1. Clone example gradle plugin demo https://github.com/gatling/gatling-gradle-plugin-demo.
  2. Run it first time with commands that are show in readme.
  3. When finished run second time.

The problem When running second time I only get and tests don’t start.

BUILD SUCCESSFUL in 1s
4 actionable tasks: 4 up-to-date

When I run gatlingRun command with clean, like this gradlew clean gatlingRun, then it starts tests again. But this also deletes results from build folder.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:24 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
slandellecommented, May 21, 2021

IMHO, having such flag only has value if we can rerun by default without impacting the whole project (typically not impacting unit tests) and this flag is used to optionally disable rerun. Otherwise, just replacing a one line option in one place with another one line option somewhere else is really not worth it.

0reactions
Isammoccommented, May 21, 2021

Closed as this can be achieved following the documentation

excerpt:

tasks.gatlingRun.outputs.upToDateWhen { false }
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to run Gradle test when all tests are UP-TO-DATE?
One option would be using the --rerun-tasks flag in the Forcing tasks to execute section. This would rerun all the the test task...
Read more >
Testing in Java & JVM projects - Gradle User Manual
This can save a lot of time when you have a long-running test suite and is ... or an invalid JVM argument is...
Read more >
Testing Gradle plugins
Probably the easiest way to test software is to manually exercise it. Manual testing can occur at any time and is not bound...
Read more >
Testing Build Logic with TestKit - Gradle User Manual
The GradleRunner facilitates programmatically executing Gradle builds, and inspecting the result. A contrived build can be created (e.g. programmatically, or ...
Read more >
Solving common problems - Gradle User Manual
With cacheable tasks incorrect results are stored permanently, and can come back to haunt you later; re-running with clean won't help in this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found