Cucumber 如果json响应包含德语字符,如何在空手道中获取响应内容?
我试图用空手道获得响应,但每当响应包含非英语字符时,它会为响应中的字段返回“??”。 相反,我希望返回实际字符Cucumber 如果json响应包含德语字符,如何在空手道中获取响应内容?,cucumber,karate,Cucumber,Karate,我试图用空手道获得响应,但每当响应包含非英语字符时,它会为响应中的字段返回“??”。 相反,我希望返回实际字符 {Id="abc", name="<Some German Text>"} 空手道脚本: Given path 'URL' When method get Then status 200 * json convertJSON = response 只需为maven-surefire插件添加以下配置 <configuration> &l
{Id="abc", name="<Some German Text>"}
空手道脚本:
Given path 'URL'
When method get
Then status 200
* json convertJSON = response
只需为
maven-surefire插件添加以下配置
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
一定要让我知道这是否有效 只需为
maven-surefire插件添加以下配置
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
一定要让我知道这是否有效
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>