无法使用intellij运行/调试Play Framework 2.6单元测试

时间:2018-10-09 07:56:41

标签: java unit-testing intellij-idea junit playframework

我下载了play-java-starter-example,试图在UnitTest.java中运行(和调试)单元测试。没有对该项目进行任何更改。刚刚将build.sbt导入intellij

我正在使用Intellij 2018.2.4,并且已安装play&scala插件

运行测试(通过intellij)时,我得到以下结果:

startSession(apiKey, sessionId, token) {
    // connect to session
    var self = this;
    self.session = OT.initSession(apiKey, sessionId);

    // Subscribe to a newly created stream
    self.session.on("streamCreated", function(event) {
       self.interval = setInterval(self.countTime, 1000);
        self.session.subscribe(
            event.stream,
            "notary-camera",
            {
                insertMode: "append",
                width: "100%",
                height: "100%",
                showControls: false
            },
            function(error) {
                if (error) {
                    console.log(error);
                } else {
                    console.log("Subscriber initialized.");
                }
            }
        );
    });

    // Create a publisher
    self.publisher = OT.initPublisher(
        "client-camera",
        {
            insertMode: "append",
            width: "100%",
            height: "100%",
            showControls: false
        },
        function(error) {
            if (error) {
                console.log(error);
            } else {
                console.log("Publisher initialized.");
            }
        }
    );

    // Connect to the session
    self.session.connect(token, function(error) {

    });
}

当我尝试调试时,我得到了:

objc[33267]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/bin/java (0x1032414c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1042744e0). One of the two will be used. Which one is undefined.

Process finished with exit code 1
Class not found: "UnitTest"Empty test suite.

任何想法如何解决此问题?

0 个答案:

没有答案