简体   繁体   English

是否可以使用FitNesseSuite JUnit运行器运行fitlibrary测试?

[英]Is it possible to run fitlibrary tests using the FitNesseSuite JUnit runner?

I already run fitnesse suites outside of the fitnesse server using a test class of the form: 我已经使用以下形式的测试类在fitnesse服务器外部运行了fitnesse套件:

@RunWith(FitNesseSuite.class)
@Name("FitNesse.MyAcceptanceTestSuite")
@FitnesseDir("src/it/resources")
@OutputDir("target/fitnesse-results")
@DebugMode(true)
public class JavaFitNesseSuiteIT {
    //
}

I've managed to get fitlibrary running on my fitnesse server but when I try to run the fitlibrary-based tests in JUnit they're ignored because they're not using 我设法在fitnesse服务器上运行fitlibrary,但是当我尝试在JUnit中运行基于fitlibrary的测试时,它们会被忽略,因为它们未使用

!define TEST_SYSTEM {slim}

Rather they use 而是他们使用

!define TEST_RUNNER {fitlibrary.suite.FitLibraryServer}

Is there any way to get them running? 有什么办法可以让它们运行?

Just put @DebugMode(false) . 只需@DebugMode(false) When the debug mode is true, it will always try to run the fitnesse tests using fit.FitServer . 当调试模式为true时,它将始终尝试使用fit.FitServer运行适应性测试。

Without DebugMode it runs the FitServer or FitLibraryServer in a new process. 如果没有DebugMode ,它将在新进程中运行FitServer或FitLibraryServer。 Thus is important to define well the classpath (will not use the one in the current process). 因此,很好地定义类路径非常重要(在当前过程中将不使用该类路径)。

I try to run FitNesse first from the project folder: 我尝试首先从项目文件夹运行FitNesse:

java -jar target/site/fitnesse-20111025.jar -p 8080 -d src/it/resources to make sure the setup is correct.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM