Java 如何在重新发布的测试用例中传递XML请求
对于我的rest服务(create student),我必须传递一个XML请求(请求类型为application/XML),如下所示:Java 如何在重新发布的测试用例中传递XML请求,java,xml,xpath,rest-assured,Java,Xml,Xpath,Rest Assured,对于我的rest服务(create student),我必须传递一个XML请求(请求类型为application/XML),如下所示: <student> <name>abc</name> </age> <addresses> <add1> <add_line1>pqr</add_line> <city>sdf</city> </add1
<student>
<name>abc</name>
</age>
<addresses>
<add1>
<add_line1>pqr</add_line>
<city>sdf</city>
</add1>
<add2>
<add_line1>pqr</add_line>
<city>sdf</city>
</add2>
<addresses>
</student>
我是这个领域的新手。有谁能建议我如何有效地做这件事吗?如果我的回答是:
<response>
<id>123</id>
<status>true</status>
<response>
123
真的
不清楚xmlstring
是从哪里来的,您的重新启动只执行预期操作,不返回任何xml。因为xmlstring在测试的返回中,同时在主体中,这意味着您重新分配了它(但它的工作方式与编写时不同),所以您的xml无效:但我看不到元素。。。
<response>
<id>123</id>
<status>true</status>
<response>