Closed adriansuarez closed 8 months ago
Hi @adriansuarez. Sounds like a good proposal. I will pick it up in the upcoming weeks so that releases are also published in Maven central.
@en-milie Excellent! Looking forward to this improvement.
CATS is now available on Maven Central: https://central.sonatype.com/artifact/com.endava/cats
@en-milie Thanks for jumping on this.
Unfortunately, I'm having issues using the Maven package. It looks like there there is a special dependency com.squareup.okhttp3:okhttp:4.10.0-CATS
that is checked into version control and can't be resolved as a transitive dependency. Maybe it should be packaged into the CATS JAR and not appear as a dependency in the POM.
I tried working around that by putting in an exclusion and explicitly declaring the published com.squareup.okhttp3:okhttp:4.10.0
as a dependency, but then I ran into an issue with the io.github.ludovicianul:pretty-logger
dependency, which is published in the GitHub Maven registry that requires authentication. I should be able to workaround that one by configuring GitHub credentials in Maven, but it would be ideal if that wasn't necessary.
Indeed. I need to rethink this a bit to make it as easy as possible to use it as dependency.
With 9.0.4 it should be much easier to use CATS as a maven dependency: https://github.com/Endava/cats#experimental-maven-dependency-for-programmatic-use
Final solution will imply publishing the okhttp fork in Maven central so that all fuzzers will run successfully.
Are there any plans to publish a Maven release and allow CATS to be used programmatically, e.g. for usage in JUnit tests in a Java project?
This would enable running CATS along with all other tests that are run in the
integration-test
phase when invokingmvn verify
.Currently if I want to run CATS as part of continuous integration, I have to download the binary using
curl
, invoke the server setup script that would normally be automatically invoked in thepre-integration-test
phase by Maven, invokecats
, invoke thepost-integration-test
script to tear down the server, and finally interpret the results by inspecting thecats-report
directory to find failed tests.It would be a lot easier to code the actual test in Java with access to the CATS APIs, rather than in a Bash script, and the parts having to do with setting up and tearing down the server would automatically be handled by Maven assuming that the CATS test is discoverable in the
integration-test
phase (it would be if it is just a JUnit test namedCatsIT
or something, which is how the Failsafe Plugin discovers integration tests).