TestProject Forum

JAR upload issue when project build with SDK

Hi,
I’m currently using Cucumber with Junit, I’ve packaged my test into a jar file using the latest SDK, I’m trying to upload the JAR file as a coded project using API. The response which I’m getting is below:

{
“hasErrors”: true,
“hasFailures”: true,
“error”: “None of the code blocks in the provided JAR are CodedTest”,
“failures”: [
“java.lang.NoClassDefFoundError: io/testproject/sdk/interfaces/junit5/ExceptionsReporter”,
“java.lang.NoClassDefFoundError: io/testproject/sdk/interfaces/junit5/ExceptionsReporter”
],
“blocks”:
}

The project works fine, when I’m running locally, However, we need to upload JAR based on our CI workflow. Pls help

This issue is solved by adding Gradle dependencies
https://docs.testproject.io/testproject-sdk/opensdk-v2/java-sdk#package-and-upload-tests-to-testproject

Also, in API request we need to remove the appId parameter from the path, which eventually uploaded the JAR to your TestProject

Correct @sumit
The API Swagger will reflect the necessary changes for OpenSDK Tests.