1

我最近开始使用 Citrus 测试框架。如果我从 gradle 命令行执行 Citrus 测试工作正常,但如果我从 Intellij 运行它们会出现问题。过去 2 天我尝试到处搜索,但无法解决我的问题。问题:它不会生成 Citrus 报告,我认为它们不会作为 Citrus 测试执行

PS。我也是spring框架的初学者。

这是我的终端输出

Gradle suite STANDARD_OUT
    11:06:06,809 INFO         citrus.Citrus|
    11:06:06,809 INFO         citrus.Citrus| ------------------------------------------------------------------------
    11:06:06,809 DEBUG        citrus.Citrus| AFTER TEST SUITE
    11:06:06,809 INFO         citrus.Citrus|
    11:06:06,809 INFO         citrus.Citrus|
    11:06:06,809 INFO         citrus.Citrus| AFTER TEST SUITE: SUCCESS
    11:06:06,809 INFO         citrus.Citrus| ------------------------------------------------------------------------
    11:06:06,809 INFO         citrus.Citrus|
    11:06:06,809 INFO         citrus.Citrus| ------------------------------------------------------------------------
    11:06:06,810 INFO         citrus.Citrus|
    11:06:06,810 INFO         citrus.Citrus| CITRUS TEST RESULTS
    11:06:06,810 INFO         citrus.Citrus|
    11:06:06,810 INFO         citrus.Citrus|  Event Group Not Found .......................................... SUCCESS
    11:06:06,811 INFO         citrus.Citrus|  Event Group Valid .............................................. SUCCESS
    11:06:06,811 INFO         citrus.Citrus|  Invalid Event Group Name ....................................... SUCCESS
    11:06:06,811 INFO         citrus.Citrus|  Missing Sport Name ............................................. SUCCESS
    11:06:06,811 INFO         citrus.Citrus|  Event Group Name Not Found ..................................... SUCCESS
    11:06:06,811 INFO         citrus.Citrus|  Meeting Name Not Found ......................................... SUCCESS
    11:06:06,811 INFO         citrus.Citrus|  Meeting Response ............................................... SUCCESS
    11:06:06,811 INFO         citrus.Citrus|  Sport Name Not Found ........................................... SUCCESS
    11:06:06,811 INFO         citrus.Citrus|  Invalid SportName .............................................. SUCCESS
    11:06:06,811 INFO         citrus.Citrus|  Max Char Sport Name ............................................ SUCCESS
    11:06:06,811 INFO         citrus.Citrus|  Sport Name Not Found ........................................... SUCCESS
    11:06:06,811 INFO         citrus.Citrus|  Sport Name valid ............................................... SUCCESS
    11:06:06,811 INFO         citrus.Citrus|
    11:06:06,811 INFO         citrus.Citrus| TOTAL:     12
    11:06:06,811 DEBUG        citrus.Citrus| SKIPPED:   0 (0.0%)
    11:06:06,811 INFO         citrus.Citrus| FAILED:    0 (0.0%)
    11:06:06,811 INFO         citrus.Citrus| SUCCESS:   12 (100.0%)
    11:06:06,811 INFO         citrus.Citrus|
    11:06:06,811 INFO         citrus.Citrus| ------------------------------------------------------------------------
    11:06:06,811 DEBUG  report.HtmlReporter| Generating HTML test report
    11:06:06,811 DEBUG       util.FileUtils| Reading file resource: 'HTMLReportTemplate.html' (encoding is 'windows-1252')
    11:06:06,837 DEBUG       util.FileUtils| Reading file resource: 'test-report.html' (encoding is 'windows-1252')
    11:06:06,845 INFO   report.HtmlReporter| Generated HTML test report
Finished generating test XML results (0.016 secs) into: C:\nzrb-api\integration-test\build\test-results\test
Generating HTML test report...
Finished generating test html results (0.031 secs) into: C:\nzrb-api\integration-test\build\reports\tests\test
:test (Thread[Daemon worker Thread 4,5,main]) completed. Took 3.651 secs.

BUILD SUCCESSFUL

IntelliJ 输出

[TestNG] Running:
  C:\Users\vihar.naik\.IdeaIC2016.3\system\temp-testng-customsuite.xml
Jan 11, 2017 10:55:55 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.GenericApplicationContext@64729b1e: startup date [Wed Jan 11 10:55:55 NZDT 2017]; root of context hierarchy
Jan 11, 2017 10:55:55 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from URL [file:/C:/nzrb-api/out/test/nzrb-api/citrus-context.xml]
Jan 11, 2017 10:55:56 AM org.springframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition
INFO: Overriding bean definition for bean 'defaultJsonMessageValidator' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=com.consol.citrus.validation.MessageValidatorConfig; factoryMethodName=getDefaultJsonTextMessageValidator; initMethodName=null; destroyMethodName=(inferred); defined in class com.consol.citrus.validation.MessageValidatorConfig] with [Generic bean: class [com.consol.citrus.validation.json.JsonTextMessageValidator]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [file:/C:/nzrb-api/out/test/nzrb-api/citrus-context.xml]]
Jan 11, 2017 10:55:56 AM org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
INFO: Loading properties file from class path resource [citrus.properties]

===============================================
Default Suite
Total tests run: 4, Failures: 0, Skips: 0
===============================================


Process finished with exit code 0
4

0 回答 0