我遇到了与解析阿拉伯语JSON值相关的问题。它显示了类似编码格式public class ExecuteScript {
private static void testRunner(Map<String, String> testngParams) {
TestNG testNG = new TestNG();
XmlSuite suite = getXmlSuite();
XmlTest test = getXmlTest(suite);
test.setParameters(testngParams);
List<XmlClass> classes = getXmlClasses();
test.setXmlClasses(classes);
List<XmlTest> tests = new ArrayList<XmlTest>();
tests.add(test);
suite.setTests(tests);
List<XmlSuite> suites = new ArrayList<XmlSuite>();
suites.add(suite);
testNG.setXmlSuites(suites);
testNG.run();
}
private static XmlSuite getXmlSuite() {
XmlSuite suite = new XmlSuite();
suite.setName("TestSuite");
return suite;
}
private static XmlTest getXmlTest(XmlSuite suite) {
XmlTest test = new XmlTest(suite);
test.setName("test_with_firefox");
return test;
}
private static List<XmlClass> getXmlClasses() {
List<XmlClass> classez = new ArrayList<XmlClass>();
classez.add(new XmlClass("com.articles.ArticleListingViewTest"));
classez.add(new XmlClass("com.mynotes.NewNoteCreationDeletionTest"));
return classez;
}
public static void main(String args[]) {
Map<String,String> params = new HashMap<String,String>();
params.put("platformname", "Android");
params.put("deviceName", "Nexus");
params.put("OSVersion", "4.2");
params.put("udid", "4d003e9be03d9");
testRunner(params);
}
等。我使用 UTF8转换在Android版本中实现了相同的效果。我是iOS环境的新手。将不胜感激与此相关的任何帮助。
PS:尝试了谷歌但无法找到解决方案。