Commit c4ed7cc9 authored by xie.qin's avatar xie.qin

firstly commit.

parent 05e2f7f3
...@@ -39,20 +39,14 @@ dependencies { ...@@ -39,20 +39,14 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok:1.18.20' annotationProcessor 'org.projectlombok:lombok:1.18.20'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.20' testAnnotationProcessor 'org.projectlombok:lombok:1.18.20'
testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.boot:spring-boot-starter-test'
/*
testImplementation 'io.cucumber:cucumber-core:4.8.1'
testImplementation 'io.cucumber:cucumber-java:4.8.1'
testImplementation 'io.cucumber:cucumber-junit:4.8.1'
testImplementation 'io.cucumber:cucumber-spring:4.8.1'
*/
testImplementation 'io.cucumber:cucumber-core:6.10.4' testImplementation 'io.cucumber:cucumber-core:6.10.4'
testImplementation 'io.cucumber:cucumber-java:6.10.4' testImplementation 'io.cucumber:cucumber-java:6.10.4'
testImplementation 'io.cucumber:cucumber-junit:6.10.4' testImplementation 'io.cucumber:cucumber-junit:6.10.4'
testImplementation 'io.cucumber:cucumber-spring:6.10.4' testImplementation 'io.cucumber:cucumber-spring:6.10.4'
testImplementation 'io.rest-assured:spring-mock-mvc:4.4.0' testImplementation 'io.rest-assured:spring-mock-mvc:4.4.0'
//testImplementation 'io.qameta.allure:allure-junit4:2.14.0' testCompile 'io.qameta.allure:allure-cucumber6-jvm:2.14.0'
//testImplementation 'io.qameta.allure:allure-cucumber4-jvm:2.14.0'
testImplementation 'io.qameta.allure:allure-cucumber6-jvm:2.14.0'
} }
test { test {
......
...@@ -49,7 +49,8 @@ public class OpenApiParser { ...@@ -49,7 +49,8 @@ public class OpenApiParser {
testRelease + File.separator + testRelease + File.separator +
"openapi" + File.separator + "openapi" + File.separator +
serviceName + "OpenAPI.json";*/ serviceName + "OpenAPI.json";*/
String openApiFilePath = "src" + File.separatorChar + "test" + File.separatorChar + "resources" + File.separatorChar + "testdatacollection" + File.separatorChar + testRelease + File.separatorChar + "openapi" + File.separatorChar + serviceName + "OpenAPI.json"; //String openApiFilePath = "src" + File.separatorChar + "test" + File.separatorChar + "resources" + File.separatorChar + "testdatacollection" + File.separatorChar + testRelease + File.separatorChar + "openapi" + File.separatorChar + serviceName + "OpenAPI.json";
String openApiFilePath = "src/test/resources/testdatacollection/" + testRelease + "/openapi/" + serviceName + "OpenAPI.json";
log.debug("openApiFilePath is {}", openApiFilePath); log.debug("openApiFilePath is {}", openApiFilePath);
File file = new File(openApiFilePath); File file = new File(openApiFilePath);
assertThat("OpenAPI File is not existed.", true, equalTo(file.exists())); assertThat("OpenAPI File is not existed.", true, equalTo(file.exists()));
......
package com.fuzamei.autotest; package com.fuzamei.autotest;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
//@SpringBootTest //@SpringBootTest
@Slf4j
public class AutoTestApplicationTests { public class AutoTestApplicationTests {
private Logger logger = LoggerFactory.getLogger(AutoTestApplicationTests.class); private Logger logger = LoggerFactory.getLogger(AutoTestApplicationTests.class);
public void AutoTestApplicationTests(){ public void AutoTestApplicationTests(){
//log.debug("test begins"); //log.debug("test begins");
logger.debug("test begins"); log.debug("test begins");
} }
} }
...@@ -8,7 +8,8 @@ import org.junit.runner.RunWith; ...@@ -8,7 +8,8 @@ import org.junit.runner.RunWith;
@RunWith(Cucumber.class) @RunWith(Cucumber.class)
@CucumberOptions( @CucumberOptions(
features = "src/test/resources/features", features = "src/test/resources/features",
plugin = {"pretty", plugin = {
"pretty",
"html:target/cucumber/report.html", "html:target/cucumber/report.html",
"json:target/cucumber/report.json", "json:target/cucumber/report.json",
"io.qameta.allure.cucumber6jvm.AllureCucumber6Jvm" "io.qameta.allure.cucumber6jvm.AllureCucumber6Jvm"
......
...@@ -4,4 +4,3 @@ ...@@ -4,4 +4,3 @@
Feature: A description Feature: A description
Scenario: A scenario Scenario: A scenario
Given something..
\ No newline at end of file
...@@ -3,5 +3,5 @@ Feature: API tests for service of backend ...@@ -3,5 +3,5 @@ Feature: API tests for service of backend
@sanity @sanity
Scenario: Verify the exposed APIs work as design Scenario: Verify the exposed APIs work as design
Given Found OpenAPI definition for backend service Given Found OpenAPI definition for backend service
When The most basic testing data orgUser is ready for backend service #When The most basic testing data orgUser is ready for backend service
Then Analyze OpenAPI file of backend service and generate REST-ful requests automatically #Then Analyze OpenAPI file of backend service and generate REST-ful requests automatically
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment