Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
auto-test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xie.qin
auto-test
Commits
c4ed7cc9
Commit
c4ed7cc9
authored
Jul 16, 2021
by
xie.qin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firstly commit.
parent
05e2f7f3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
17 deletions
+13
-17
build.gradle
build.gradle
+3
-9
OpenApiParser.java
...main/java/com/fuzamei/autotest/openapi/OpenApiParser.java
+2
-1
AutoTestApplicationTests.java
...t/java/com/fuzamei/autotest/AutoTestApplicationTests.java
+3
-1
CucumberRunner.java
...test/java/com/fuzamei/autotest/runner/CucumberRunner.java
+2
-1
user_register.feature
...res/apitest/restful/user_management/user_register.feature
+0
-2
backend.feature
src/test/resources/features/sanitytest/backend.feature
+3
-3
No files found.
build.gradle
View file @
c4ed7cc9
...
@@ -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
{
...
...
src/main/java/com/fuzamei/autotest/openapi/OpenApiParser.java
View file @
c4ed7cc9
...
@@ -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
()));
...
...
src/test/java/com/fuzamei/autotest/AutoTestApplicationTests.java
View file @
c4ed7cc9
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");
log
ger
.
debug
(
"test begins"
);
log
.
debug
(
"test begins"
);
}
}
}
}
src/test/java/com/fuzamei/autotest/runner/CucumberRunner.java
View file @
c4ed7cc9
...
@@ -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"
...
...
src/test/resources/features/apitest/restful/user_management/user_register.feature
View file @
c4ed7cc9
...
@@ -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
src/test/resources/features/sanitytest/backend.feature
View file @
c4ed7cc9
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment