我正在使用IntelliJ 2018.1,并且尝试运行TeaVM JUnit测试,但是从CTRL + SHIFT + F10运行测试时,将被跳过:
@RunWith(TeaVMTestRunner.class)
@SkipJVM
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class ShapeTest {
static final Logger logger = Logger.getLogger(ShapeTest.class.getName());
@Rule
public final ExpectedException exception = ExpectedException.none();
@Test
public void testGet() {
System.out.println("ShapeTest - testGet");
String response = Shape.get("https://httpbin.org/get")
.header("accept", "application/json")
.header("Content-Type", "application/json")
.asJson();
JSONObject json = new JSONObject(response);
String url = json.getString("url");
JSONObject headers = json.getJSONObject("headers");
assertNotNull(json);
assertNotNull(url);
assertNotNull(headers);
System.out.println(json.toString());
}
}
但是当使用以下命令从终端运行时,它可以工作:
mvn test -Dteavm.junit.target=target/js-tests -Dteavm.junit.js.runner=h
tmlunit -Dteavm.junit.js.threads=2
这里的任何IntelliJ / JUnit专家可能都知道为什么会这样吗?
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句