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.

Pact file is not generated (Android, Gradle Wrapper)

See original GitHub issue
au.com.dius:pact-jvm-consumer-junit5:4.0.10
au.com.dius:pact-jvm-consumer-java8:4.0.10
au.com.dius.pact 4.1.7
Gradle 6.1.1

Running JUnit5 consumer tests within IntelliJ (Android Studio) generates the Pact file just fine and outputs it to app/target/pacts.

However, running the same tests from command line using ./gradlew clean testSomeBuildVariantUnitTest does not generate anything.

How can one run unit tests from command line in order to have the file created?

Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
uglyogcommented, Sep 14, 2020

Check for a build/pacts directory. Gradle generates output files into build, not target

0reactions
borwojcommented, Sep 15, 2020

Ah of course, bingo! I was checking the app/target/pacts path only. Thanks a lot @uglyog! 🙇

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pact file is not generated (Android, Gradle Wrapper) #1204
Running JUnit5 consumer tests within IntelliJ (Android Studio) generates the Pact file just fine and outputs it to app/target/pacts .
Read more >
Pact File Not Generated Inspite of test being Passed
This is a Maven project, and I believe the pact file is generated after the Maven->install or build command? The build is a...
Read more >
Gradle plugin to verify a provider | Pact Docs
The Gradle plugin creates a task pactVerify to your build which will verify all configured pacts against your provider. Important Note: Any ...
Read more >
PACT JVM Example | ArXmanS
This repository codes provide an example about how to do Contract Test with PACT JVM Junit, which uses Junit in Consumer side and...
Read more >
Initialization Scripts - Gradle User Manual
Specify a file on the command line. The command line option is -I or --init-script followed by the path to the script. ·...
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