当前位置: 首页 > 知识库问答 >
问题:

使用Rest API Python更新QC中的测试执行状态

阎祖鹤
2023-03-14
requests.put(self.url + u'/qcbin/rest/domains/<Domain name>/projects/<Project name>/test-instances/query={id[1];test-id[3]}', headers=self.header, data=xml, auth=(self.username,self.__password))
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><QCRestException><Id>qccore.general-error</Id><Title>Not Found</Title><StackTrace>javax.ws.rs.WebApplicationException&#xD;
at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:84)&#xD;
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)&#xD;
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)&#xD;
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:61)&#xD;
at org.apache.wink.server.internal.handlers.FindRootResourceHandler.handleRequest(FindRootResourceHandler.java:93)&#xD;
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)&#xD;
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)&#xD;
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:61)&#xD;
at org.apache.wink.server.internal.handlers.HeadMethodHandler.handleRequest(HeadMethodHandler.java:53)&#xD;
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)&#xD;
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)&#xD;
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:61)&#xD;
at org.apache.wink.server.internal.handlers.OptionsMethodHandler.handleRequest(OptionsMethodHandler.java:46)&#xD;
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)&#xD;
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)&#xD;
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:61)&#xD;
at org.apache.wink.server.internal.handlers.SearchResultHandler.handleRequest(SearchResultHandler.java:33)&#xD;
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)&#xD;
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)&#xD;
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:61)&#xD;
at org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:48)&#xD;
at org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:163)&#xD;
at org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:137)&#xD;
at org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:116)&#xD;
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)&#xD;
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)&#xD;
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)&#xD;
at org.hp.qc.web.restapi.RESTApiFilter.doFilter(RESTApiFilter.java:67)&#xD;
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)&#xD;
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)&#xD;
at org.hp.qc.web.restapi.performance.PerformanceMonitorRESTFilter.doFilter(PerformanceMonitorRESTFilter.java:45)&#xD;
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)&#xD;
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)&#xD;
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)&#xD;
at com.hp.sw.bto.ast.security.lwsso.authenticator.springSecurity.SpringSecurity2LWSSOIntegrationFilter.doFilter(SpringSecurity2LWSSOIntegrationFilter.java:182)&#xD;
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)&#xD;
at org.hp.qc.web.restapi.sessionmanagement.ImplicitSessionFilter.doFilter(ImplicitSessionFilter.java:54)&#xD;
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)&#xD;
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)&#xD;
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)&#xD;
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)&#xD;
at com.hp.sw.bto.ast.security.lwsso.authenticator.springSecurity.LWSSO2SpringSecurityIntegrationFilter.doFilter(LWSSO2SpringSecurityIntegrationFilter.java:299)&#xD;
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)&#xD;
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)&#xD;
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)&#xD;
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)&#xD;
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)&#xD;
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)&#xD;
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)&#xD;
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)&#xD;
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)&#xD;
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)&#xD;
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)&#xD;
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)&#xD;
at com.mercury.optane.core.state.ServerStatusFilter.doFilter(ServerStatusFilter.java:33)&#xD;
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)&#xD;
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)&#xD;
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)&#xD;
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)&#xD;
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)&#xD;
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)&#xD;
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)&#xD;
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)&#xD;
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)&#xD;
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)&#xD;
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)&#xD;
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)&#xD;
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)&#xD;
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)&#xD;
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)&#xD;
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)&#xD;
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)&#xD;
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)&#xD;
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)&#xD;
at java.lang.Thread.run(Thread.java:619)&#xD;

共有1个答案

姜天宇
2023-03-14
requests.put(self.url + u'/qcbin/rest/domains/<Domain name>/projects/<Project name>/test-instances/query={id[1];test-id[3]}', headers=self.header, data=xml, auth=(self.username,self.__password))
/test-instances/query={id[1];test-id[3]}
/test-instances?query={id[1];test-id[3]}
 类似资料:
  • 我有一个与Zephyr相关的查询,我如何通过rest API使用测试用例ID来更新测试用例的执行状态以通过/失败/WIP 我已经参考了下面链接中的文章https://support.getzephyr.com/hc/en-us/articles/205042055-Sample-REST-API-Update-execution-status-of-a-testcase-JAVA- 在本例中,他们

  • 如何使用量角器框架自动更新Jira中的测试执行状态(通过/失败)。 测试管理工具使用Jira和zephy插件。 有可用的Rest API插件吗?请提供示例。 任何帮助都将不胜感激。

  • 我编写了以下代码来从QC检索测试用例列表,但是为空,而当我评估它返回一个Com4j对象。 我做错什么了

  • 我有Jira,包括他们的插件Zephyr和ZAPI。我正在运行Jenkins的代码,如视频所示。我的代码是Java TestNG,我还没有为Jenkins添加Junit插件。我的测试运行正常,但控制台输出显示: 构建结果为SUCCESS null解析JUnit测试结果的问题。解析可靠报告时出错。请确保“添加发布JUnit测试结果报告”作为构建后操作构建步骤“将测试结果发布到Zephar for J

  • 我找不到解决方法,所以我在这里发帖寻求帮助。我在并行运行测试时遇到问题(使用POM和page factory)。 *\Testbase类*/ *POM类* *测试用例* *XML文件* 我收到java nullpointerexception错误 **更新我碰到的错误,/*POM类*\createnewpage方法驱动程序返回一个空参数。 无论如何,我在这里尝试的是运行两个chrome浏览器进行并

  • 问题内容: 我有类似的东西: 设置状态仍然是异步的,那么等待此调用完成的最佳方法是什么? 本似乎并没有接受一个回调像使用。 一个例子 基于类 转换为基于功能的 在上面,我们要顺序运行每个setWhatever调用。这是否意味着我们需要设置许多不同的useEffect挂钩来复制此行为? 问题答案: 状态更新完成后,setter不会提供回调,就像React类组件中的setState一样。为了复制相同的