TestProject Forum

TestProject Platform => TestProject SDK => Topic started by: akashrathod8 on July 28, 2018, 19:02:38 pm

Title: Receiving an error when trying to upload Addon JAR
Post by: akashrathod8 on July 28, 2018, 19:02:38 pm
Hi
I have created Addon on TestProject platform, now i have to upload file into it.
what type of file need type uploaded. I have tried with jar file which I can able to upload in new test and can run it on TestProject platform. but I am getting error message like 'operation fail please try again'
Please help thanks.
Title: Re: help with creating addons
Post by: bhuvanaqe on July 29, 2018, 06:30:41 am
I see similar problem, while uploading addon JAR. Is JAR the right file to upload?Here is the screenshot - https://imgur.com/a/wv5KRzf
Title: Re: help with creating addons
Post by: Eldar on July 29, 2018, 07:56:11 am
Hello all,

Please send us the JAR files for analysis.
Title: Re: help with creating addons
Post by: akashrathod8 on July 29, 2018, 08:12:06 am
Check the JAR on this path
https://drive.google.com/open?id=1hhUD2fUmbVT7k6RfavfoIIo4krV-XtWC
Title: Re: help with creating addons
Post by: Eldar on July 29, 2018, 10:40:47 am
Thanks for the JAR file.

It appears that you are trying to upload a coded test as an addon.
Please make sure that you have the correct annotations defined and you have a valid manifest file.
You can find all the relevant info on our github page: https://github.com/testproject-io/java-sdk-examples/tree/master/Web#addon-development

We will add a more informative user message in the nearest future.
Please let Us know if you've able to finalize the process and/or if any additional assistance is required.
Title: Re: help with creating addons
Post by: bhuvanaqe on July 29, 2018, 17:04:07 pm
In my case the problem was that the Addon JAR had testproject SDK inside of it and was not removed during uber jar creation. I fixed it and now able to upload JAR. Thanks for the help.
Title: Re: help with creating addons
Post by: akashrathod8 on July 30, 2018, 19:55:25 pm
Hi Eldar,

I have added the annotations and manifest file in project and while creating jar,
but still i am getting the same issue, from error message I am not getting where my Jar getting fail.
find my Jar here. https://drive.google.com/drive/folders/1hhUD2fUmbVT7k6RfavfoIIo4krV-XtWC?usp=sharing

please suggest changes in project.

thanks,
Title: Re: help with creating addons
Post by: Marat Strelets on July 30, 2018, 20:18:13 pm
You are still implementing WebTest interface and not WebAction
Here is an example of an Action: https://github.com/testproject-io/java-sdk-examples/blob/master/Web/Addon/src/main/java/io/testproject/examples/sdk/java/ClearFields.java
Title: Re: help with creating addons
Post by: akashrathod8 on July 30, 2018, 22:26:36 pm
I have updated with Web Action and still facing same issue.

updated file on path :  https://drive.google.com/drive/folders/1hhUD2fUmbVT7k6RfavfoIIo4krV-XtWC?usp=sharing

also updated recording.

Title: Re: help with creating addons
Post by: Marat Strelets on July 30, 2018, 22:36:08 pm
How did you import the manifest.json file? Looking into your JAR seems like it's no longer called manifest.json and no longer a JSON file.
Are you using Gradle task JAR as shown in the example? https://github.com/testproject-io/java-sdk-examples/blob/master/Web/Addon/build.gradle#L19
Title: Re: help with creating addons
Post by: akashrathod8 on July 31, 2018, 16:26:13 pm
Hi Marat,
Thanks for reply
Yes I am Creating manifest file by comping its parameters , now I have imported the JSON file directly.
Now I am able to update jar in addon and can able to publish my addon.

Thank you.
Title: Re: help with creating addons
Post by: Marat Strelets on July 31, 2018, 16:52:07 pm
Glad to hear that :)