Closed lazarenok closed 8 years ago
Hi!
In TestLink you are not allowed to set a test execution that was executed back to not run.
HTH, Bruno
Hi! Thank you for your response!
Yes, I know that status can't be set back to NOT RUN. But in Testlink I have a new build for test plan, for experiment I created a new test case that has never been executed, and from soapUi tried to report it as NOT RUN, but still I had error:
Fri Mar 14 09:59:48 CET 2014:ERROR:br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException: The status code (n) provided is not valid! br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException: The status code (n) provided is not valid! at br.eti.kinoshita.testlinkjavaapi.BaseService.checkResponseError(BaseService.java:113) at br.eti.kinoshita.testlinkjavaapi.BaseService.executeXmlRpcCall(BaseService.java:91) at br.eti.kinoshita.testlinkjavaapi.TestCaseService.reportTCResult(TestCaseService.java:561) at br.eti.kinoshita.testlinkjavaapi.TestLinkAPI.reportTCResult(TestLinkAPI.java:924) at br.eti.kinoshita.testlinkjavaapi.TestLinkAPI$reportTCResult.call(Unknown Source) at Script6$_run_closure1.doCall(Script6.groovy:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:885) at groovy.lang.Closure.call(Closure.java:405) at groovy.lang.Closure.call(Closure.java:418) at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForLine(DefaultGroovyMethods.java:2859) at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachLine(DefaultGroovyMethods.java:11895) at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachLine(DefaultGroovyMethods.java:11702) at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachLine(DefaultGroovyMethods.java:11668) at org.codehaus.groovy.runtime.dgm$143.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at Script6.run(Script6.groovy:29) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148) at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Hi,
Not only set back. IIRC the code simply throws an error if the status is not run. Regardless of the previous status.
Maybe you can change your soapui scripts to assume it is already not run by default.
HTH Bruno
Em sex, 14 de mar de 2014 06:06 BRT lazarenok escreveu:
Hi! Thank you for your response!
Yes, I know that status can't be set back to NOT RUN. But in Testlink I have a new build for test plan, for experiment I created a new test case that has never been executed, and from soapUi tried to report it as NOT RUN, but still I had error:
Fri Mar 14 09:59:48 CET 2014:ERROR:br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException: The status code (n) provided is not valid! br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException: The status code (n) provided is not valid! at br.eti.kinoshita.testlinkjavaapi.BaseService.checkResponseError(BaseService.java:113) at br.eti.kinoshita.testlinkjavaapi.BaseService.executeXmlRpcCall(BaseService.java:91) at br.eti.kinoshita.testlinkjavaapi.TestCaseService.reportTCResult(TestCaseService.java:561) at br.eti.kinoshita.testlinkjavaapi.TestLinkAPI.reportTCResult(TestLinkAPI.java:924) at br.eti.kinoshita.testlinkjavaapi.TestLinkAPI$reportTCResult.call(Unknown Source) at Script6$_run_closure1.doCall(Script6.groovy:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:885) at groovy.lang.Closure.call(Closure.java:405) at groovy.lang.Closure.call(Closure.java:418) at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForLine(DefaultGroovyMethods.java:2859) at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachLine(DefaultGroovyMethods.java:11895) at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachLine(DefaultGroovyMethods.java:11702) at org.codehaus.groovy.runtime.DefaultGroovyMethods.eachLine(DefaultGroovyMethods.java:11668) at org.codehaus.groovy.runtime.dgm$143.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at Script6.run(Script6.groovy:29) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148) at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:274) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
Reply to this email directly or view it on GitHub: https://github.com/kinow/testlink-java-api/issues/42#issuecomment-37627944
Hi,
Then I will change the part of script where results are written to the file and just omit those tests that are not run, and there won't be error in the script that sends results to TestLink. Thank you very much! Now at least I know that the problem is that it's not possible to do what I planned, and not that I did smth wrong :)
Best regards, Anna
Glad it helped! Let me know if you need anything else. Bruno P. Kinoshita http://kinoshita.eti.br http://tupilabs.com
From: lazarenok notifications@github.com To: kinow/testlink-java-api testlink-java-api@noreply.github.com Cc: Bruno P. Kinoshita brunodepaulak@yahoo.com.br Sent: Friday, March 14, 2014 11:57 AM Subject: Re: [testlink-java-api] Reporting test results from soapUI to Testlink with result=NOT_RUN fails (#42)
Hi, Then I will change the part of script where results are written to the file and just omit those tests that are not run, and there won't be error in the script that sends results to TestLink. Thank you very much! Now at least I know that the problem is that it's not possible to do what I planned, and not that I did smth wrong :) Best regards, Anna — Reply to this email directly or view it on GitHub.
Hi all, I'm researching about "How to update test cases status in the teslink on SoapUI. Could you please help me... How I can use the Testlink API? How I can update status of the test cases?" Do you have any example or demo? Thank you so much !!!! Yen Nguyen
Hi,
I have a same requirement, get and update the testcase status. There is no API available.
Please let me know is there any way.
Thanks in advance.
Probably the easiest way to learn is through the tests
The API is a bit outdated, so some adjustments may be necessary (pull requests/patches welcome :-) )
Closing as I believe the issue was about setting the result status to NOT_RUN (which is not allowed by TestLink).
Hi Kinow,
Thanks for your reply.
My requirement is to get and update the test-case status (i.e.) DRAFT,FINAL, FUTURE and etc. I am able to see enum namely "TestCaseStatus.java" in the testlink-java-api-1.9.13.jar but no api to get and update the testcase status. In model "TestCase.java", there is no variable (getter/setter) for testcase status. Can you please let me know.
Regards, C.Rajaguru
Hi Rajaguru,
Can't promise any work on the API right now. Got a backlog at $work, and other projects that I'm planning to start development cycles to fix/release issues.
Might be easier when you have some code to show where you are struggling (pull request, gist, etc). Unless it is related to this issue, let's move the conversation elsewhere, otherwise everyone watching it (4 people) gets a notification for that :-)
Thanks Kino. Is it fine, can I communicate via email instead of forum.
I am trying to get "Testcase" object by specifying plan id and build and able to get "TestCase" object but no api (getter/setter) is available in "TestCase.java" to get the status also no api available to update the testcase status.
Following Java snippet:
public Map<Integer, TestCase> getTestcasesForTestPlanAndBuild(int planId, int buildId) {
Please find the attachment, screen-shot for more info:
On Tue, Jan 19, 2016 at 2:51 PM, Bruno P. Kinoshita < notifications@github.com> wrote:
Hi Rajaguru,
Can't promise any work on the API right now. Got a backlog at $work, and other projects that I'm planning to start development cycles to fix/release issues.
Might be easier when you have some code to show where you are struggling (pull request, gist, etc). Unless it is related to this issue, let's move the conversation elsewhere, otherwise everyone watching it (4 people) gets a notification for that :-)
— Reply to this email directly or view it on GitHub https://github.com/kinow/testlink-java-api/issues/42#issuecomment-172786676 .
Your comments are still on GitHub. If you are seeing this as an e-mail, it is actually a GitHub notification. Replying it, automatically creates a comment in the closed ticket and again notifies everyone.
Locking conversation.
Hi! I'm using soapUI 4.0.1, testlink-java-api-1.9.8-1, testlink-api-client-2.0. The problem that I encountered is the following:
In my soapUI project I have a groovy script that creates a file for execution results; second groovy script that loops through all Test Steps for each Test Case and depending on testStep.assertionStatus.toString (UNKNOWN, VALID or FAILED) writes results to this file, and the third script that reads results from the file and using testlinkAPIClient.reportTCResult sends results to TestLink. Parameter "ExecutionStatus status" for reportTCResult can be ExecutionStatus.PASSED, ExecutionStatus.FAILED or ExecutionStatus.NOT_RUN. The first two work fine, but when it gets to NOT_RUN I have error message "ERROR:br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException: The status code (n) provided is not valid!"
Maybe I'm doing smth wrong...I don't know... Did anyone have the same issue?