├── .allure └── allure-2.13.9 │ ├── bin │ ├── allure │ └── allure.bat │ ├── config │ ├── allure-cucumber.yml │ ├── allure-junit.yml │ └── allure.yml │ ├── lib │ ├── allure-commandline-2.13.9.jar │ ├── allure-generator-2.13.9.jar │ ├── allure-model-2.13.0.jar │ ├── allure-plugin-api-2.13.9.jar │ ├── allure1-model-1.0.jar │ ├── commons-beanutils-1.9.3.jar │ ├── commons-codec-1.11.jar │ ├── commons-collections-3.2.2.jar │ ├── commons-collections4-4.2.jar │ ├── commons-io-2.6.jar │ ├── commons-lang3-3.9.jar │ ├── commons-logging-1.2.jar │ ├── commons-text-1.3.jar │ ├── config │ │ ├── jetty-logging.properties │ │ └── log4j.properties │ ├── flexmark-0.50.36.jar │ ├── flexmark-util-0.50.36.jar │ ├── freemarker-2.3.29.jar │ ├── httpclient-4.5.9.jar │ ├── httpcore-4.4.11.jar │ ├── jackson-annotations-2.9.0.jar │ ├── jackson-core-2.9.8.jar │ ├── jackson-databind-2.9.8.jar │ ├── jackson-dataformat-xml-2.9.8.jar │ ├── jackson-dataformat-yaml-2.9.8.jar │ ├── jackson-module-jaxb-annotations-2.9.8.jar │ ├── javax.activation-api-1.2.0.jar │ ├── javax.servlet-api-3.1.0.jar │ ├── jaxb-api-2.3.1.jar │ ├── jaxb-utils-1.0.jar │ ├── jcommander-1.78.jar │ ├── jetty-http-9.4.20.v20190813.jar │ ├── jetty-io-9.4.20.v20190813.jar │ ├── jetty-server-9.4.20.v20190813.jar │ ├── jetty-util-9.4.20.v20190813.jar │ ├── log4j-1.2.17.jar │ ├── opencsv-4.6.jar │ ├── properties-2.0.RC5.jar │ ├── slf4j-api-1.7.28.jar │ ├── slf4j-log4j12-1.7.28.jar │ ├── snakeyaml-1.23.jar │ ├── stax2-api-3.1.4.jar │ ├── tika-core-1.22.jar │ └── woodstox-core-5.0.3.jar │ └── plugins │ ├── README.txt │ ├── behaviors-plugin │ ├── allure-plugin.yml │ ├── behaviors-plugin-2.13.9.jar │ └── static │ │ └── index.js │ ├── custom-logo-plugin │ ├── allure-plugin.yml │ ├── custom-logo-plugin-2.13.9.jar │ └── static │ │ ├── custom-logo.svg │ │ └── styles.css │ ├── jira-plugin │ ├── allure-plugin.yml │ ├── jira-plugin-2.13.9.jar │ └── lib │ │ ├── allure-jira-commons-2.13.9.jar │ │ ├── converter-jackson-2.6.1.jar │ │ ├── jackson-annotations-2.9.0.jar │ │ ├── jackson-core-2.9.8.jar │ │ ├── jackson-databind-2.9.8.jar │ │ ├── okhttp-3.12.0.jar │ │ ├── okio-1.15.0.jar │ │ └── retrofit-2.6.1.jar │ ├── junit-xml-plugin │ ├── allure-plugin.yml │ └── junit-xml-plugin-2.13.9.jar │ ├── packages-plugin │ ├── allure-plugin.yml │ ├── packages-plugin-2.13.9.jar │ └── static │ │ └── index.js │ ├── screen-diff-plugin │ ├── allure-plugin.yml │ ├── screen-diff-plugin-2.13.9.jar │ └── static │ │ ├── index.js │ │ └── styles.css │ ├── trx-plugin │ ├── allure-plugin.yml │ └── trx-plugin-2.13.9.jar │ ├── xctest-plugin │ ├── allure-plugin.yml │ ├── lib │ │ └── xmlwise-1.2.11.jar │ └── xctest-plugin-2.13.9.jar │ ├── xray-plugin │ ├── allure-plugin.yml │ ├── lib │ │ ├── allure-jira-commons-2.13.9.jar │ │ ├── converter-jackson-2.6.1.jar │ │ ├── jackson-annotations-2.9.0.jar │ │ ├── jackson-core-2.9.8.jar │ │ ├── jackson-databind-2.9.8.jar │ │ ├── okhttp-3.12.0.jar │ │ ├── okio-1.15.0.jar │ │ └── retrofit-2.6.1.jar │ └── xray-plugin-2.13.9.jar │ └── xunit-xml-plugin │ ├── allure-plugin.yml │ └── xunit-xml-plugin-2.13.9.jar ├── .idea ├── compiler.xml ├── encodings.xml ├── misc.xml ├── uiDesigner.xml ├── vcs.xml └── workspace.xml ├── README.md ├── caseData └── caseData.xlsx ├── pom.xml ├── src └── test │ ├── java │ └── com │ │ └── qzcsbj │ │ └── autotest │ │ ├── entity │ │ ├── CaseData.java │ │ ├── InitSqlRes.java │ │ ├── Sql.java │ │ └── Variable.java │ │ ├── listener │ │ └── ExtentTestNGIReporterListener.java │ │ ├── testcase │ │ ├── BaseCase.java │ │ ├── BaseSuite.java │ │ ├── BaseTest.java │ │ └── DemoCase.java │ │ └── utils │ │ ├── AssertUtil.java │ │ ├── ExcelUtil.java │ │ ├── GlobalVariableUtil.java │ │ ├── HttpRequestJsonUtil.java │ │ ├── HttpRequestUtil.java │ │ ├── InitSqlUtil.java │ │ ├── JDBCUtil.java │ │ ├── PropertiesUtil.java │ │ ├── StringUtil.java │ │ └── VariableUtil.java │ └── resources │ ├── config.properties │ ├── jdbc.properties │ └── log4j.properties └── testngXML └── testng.xml /.allure/allure-2.13.9/bin/allure: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## allure start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/.." >/dev/null 40 | export APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="allure" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and ALLURE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS="" 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/lib/allure-commandline-2.13.9.jar:$APP_HOME/lib/jcommander-1.78.jar:$APP_HOME/lib/allure-generator-2.13.9.jar:$APP_HOME/lib/allure-plugin-api-2.13.9.jar:$APP_HOME/lib/jackson-dataformat-xml-2.9.8.jar:$APP_HOME/lib/allure-model-2.13.0.jar:$APP_HOME/lib/jackson-module-jaxb-annotations-2.9.8.jar:$APP_HOME/lib/jackson-databind-2.9.8.jar:$APP_HOME/lib/jackson-dataformat-yaml-2.9.8.jar:$APP_HOME/lib/commons-io-2.6.jar:$APP_HOME/lib/jetty-server-9.4.20.v20190813.jar:$APP_HOME/lib/slf4j-log4j12-1.7.28.jar:$APP_HOME/lib/jackson-annotations-2.9.0.jar:$APP_HOME/lib/jackson-core-2.9.8.jar:$APP_HOME/lib/snakeyaml-1.23.jar:$APP_HOME/lib/javax.servlet-api-3.1.0.jar:$APP_HOME/lib/jetty-http-9.4.20.v20190813.jar:$APP_HOME/lib/jetty-io-9.4.20.v20190813.jar:$APP_HOME/lib/allure1-model-1.0.jar:$APP_HOME/lib/slf4j-api-1.7.28.jar:$APP_HOME/lib/log4j-1.2.17.jar:$APP_HOME/lib/jaxb-api-2.3.1.jar:$APP_HOME/lib/httpclient-4.5.9.jar:$APP_HOME/lib/tika-core-1.22.jar:$APP_HOME/lib/freemarker-2.3.29.jar:$APP_HOME/lib/jetty-util-9.4.20.v20190813.jar:$APP_HOME/lib/opencsv-4.6.jar:$APP_HOME/lib/flexmark-0.50.36.jar:$APP_HOME/lib/woodstox-core-5.0.3.jar:$APP_HOME/lib/stax2-api-3.1.4.jar:$APP_HOME/lib/javax.activation-api-1.2.0.jar:$APP_HOME/lib/properties-2.0.RC5.jar:$APP_HOME/lib/jaxb-utils-1.0.jar:$APP_HOME/lib/httpcore-4.4.11.jar:$APP_HOME/lib/commons-beanutils-1.9.3.jar:$APP_HOME/lib/commons-logging-1.2.jar:$APP_HOME/lib/commons-codec-1.11.jar:$APP_HOME/lib/commons-text-1.3.jar:$APP_HOME/lib/commons-lang3-3.9.jar:$APP_HOME/lib/commons-collections4-4.2.jar:$APP_HOME/lib/flexmark-util-0.50.36.jar:$APP_HOME/lib/commons-collections-3.2.2.jar:$APP_HOME/lib/config 84 | 85 | # Determine the Java command to use to start the JVM. 86 | if [ -n "$JAVA_HOME" ] ; then 87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 88 | # IBM's JDK on AIX uses strange locations for the executables 89 | JAVACMD="$JAVA_HOME/jre/sh/java" 90 | else 91 | JAVACMD="$JAVA_HOME/bin/java" 92 | fi 93 | if [ ! -x "$JAVACMD" ] ; then 94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 95 | 96 | Please set the JAVA_HOME variable in your environment to match the 97 | location of your Java installation." 98 | fi 99 | else 100 | JAVACMD="java" 101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 102 | 103 | Please set the JAVA_HOME variable in your environment to match the 104 | location of your Java installation." 105 | fi 106 | 107 | # Increase the maximum file descriptors if we can. 108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 109 | MAX_FD_LIMIT=`ulimit -H -n` 110 | if [ $? -eq 0 ] ; then 111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 112 | MAX_FD="$MAX_FD_LIMIT" 113 | fi 114 | ulimit -n $MAX_FD 115 | if [ $? -ne 0 ] ; then 116 | warn "Could not set maximum file descriptor limit: $MAX_FD" 117 | fi 118 | else 119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 120 | fi 121 | fi 122 | 123 | # For Darwin, add options to specify how the application appears in the dock 124 | if $darwin; then 125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 126 | fi 127 | 128 | # For Cygwin or MSYS, switch paths to Windows format before running java 129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 132 | JAVACMD=`cygpath --unix "$JAVACMD"` 133 | 134 | # We build the pattern for arguments to be converted via cygpath 135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 136 | SEP="" 137 | for dir in $ROOTDIRSRAW ; do 138 | ROOTDIRS="$ROOTDIRS$SEP$dir" 139 | SEP="|" 140 | done 141 | OURCYGPATTERN="(^($ROOTDIRS))" 142 | # Add a user-defined pattern to the cygpath arguments 143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 145 | fi 146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 147 | i=0 148 | for arg in "$@" ; do 149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 151 | 152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 154 | else 155 | eval `echo args$i`="\"$arg\"" 156 | fi 157 | i=$((i+1)) 158 | done 159 | case $i in 160 | (0) set -- ;; 161 | (1) set -- "$args0" ;; 162 | (2) set -- "$args0" "$args1" ;; 163 | (3) set -- "$args0" "$args1" "$args2" ;; 164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 170 | esac 171 | fi 172 | 173 | # Escape application args 174 | save () { 175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 176 | echo " " 177 | } 178 | APP_ARGS=$(save "$@") 179 | 180 | # Collect all arguments for the java command, following the shell quoting and substitution rules 181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $ALLURE_OPTS -classpath "\"$CLASSPATH\"" io.qameta.allure.CommandLine "$APP_ARGS" 182 | 183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 184 | if [ "" ] && [ "$HOME" = "$PWD" ]; then 185 | cd "$(dirname "$0")" 186 | fi 187 | 188 | exec "$JAVACMD" "$@" 189 | -------------------------------------------------------------------------------- /.allure/allure-2.13.9/bin/allure.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem allure startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME%.. 31 | 32 | @rem Add default JVM options here. You can also use JAVA_OPTS and ALLURE_OPTS to pass JVM options to this script. 33 | set DEFAULT_JVM_OPTS= 34 | 35 | @rem Find java.exe 36 | if defined JAVA_HOME goto findJavaFromJavaHome 37 | 38 | set JAVA_EXE=java.exe 39 | %JAVA_EXE% -version >NUL 2>&1 40 | if "%ERRORLEVEL%" == "0" goto init 41 | 42 | echo. 43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 44 | echo. 45 | echo Please set the JAVA_HOME variable in your environment to match the 46 | echo location of your Java installation. 47 | 48 | goto fail 49 | 50 | :findJavaFromJavaHome 51 | set JAVA_HOME=%JAVA_HOME:"=% 52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 53 | 54 | if exist "%JAVA_EXE%" goto init 55 | 56 | echo. 57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 58 | echo. 59 | echo Please set the JAVA_HOME variable in your environment to match the 60 | echo location of your Java installation. 61 | 62 | goto fail 63 | 64 | :init 65 | @rem Get command-line arguments, handling Windows variants 66 | 67 | if not "%OS%" == "Windows_NT" goto win9xME_args 68 | 69 | :win9xME_args 70 | @rem Slurp the command line arguments. 71 | set CMD_LINE_ARGS= 72 | set _SKIP=2 73 | 74 | :win9xME_args_slurp 75 | if "x%~1" == "x" goto execute 76 | 77 | set CMD_LINE_ARGS=%* 78 | 79 | :execute 80 | @rem Setup the command line 81 | 82 | set CLASSPATH=%APP_HOME%\lib\allure-commandline-2.13.9.jar;%APP_HOME%\lib\jcommander-1.78.jar;%APP_HOME%\lib\allure-generator-2.13.9.jar;%APP_HOME%\lib\allure-plugin-api-2.13.9.jar;%APP_HOME%\lib\jackson-dataformat-xml-2.9.8.jar;%APP_HOME%\lib\allure-model-2.13.0.jar;%APP_HOME%\lib\jackson-module-jaxb-annotations-2.9.8.jar;%APP_HOME%\lib\jackson-databind-2.9.8.jar;%APP_HOME%\lib\jackson-dataformat-yaml-2.9.8.jar;%APP_HOME%\lib\commons-io-2.6.jar;%APP_HOME%\lib\jetty-server-9.4.20.v20190813.jar;%APP_HOME%\lib\slf4j-log4j12-1.7.28.jar;%APP_HOME%\lib\jackson-annotations-2.9.0.jar;%APP_HOME%\lib\jackson-core-2.9.8.jar;%APP_HOME%\lib\snakeyaml-1.23.jar;%APP_HOME%\lib\javax.servlet-api-3.1.0.jar;%APP_HOME%\lib\jetty-http-9.4.20.v20190813.jar;%APP_HOME%\lib\jetty-io-9.4.20.v20190813.jar;%APP_HOME%\lib\allure1-model-1.0.jar;%APP_HOME%\lib\slf4j-api-1.7.28.jar;%APP_HOME%\lib\log4j-1.2.17.jar;%APP_HOME%\lib\jaxb-api-2.3.1.jar;%APP_HOME%\lib\httpclient-4.5.9.jar;%APP_HOME%\lib\tika-core-1.22.jar;%APP_HOME%\lib\freemarker-2.3.29.jar;%APP_HOME%\lib\jetty-util-9.4.20.v20190813.jar;%APP_HOME%\lib\opencsv-4.6.jar;%APP_HOME%\lib\flexmark-0.50.36.jar;%APP_HOME%\lib\woodstox-core-5.0.3.jar;%APP_HOME%\lib\stax2-api-3.1.4.jar;%APP_HOME%\lib\javax.activation-api-1.2.0.jar;%APP_HOME%\lib\properties-2.0.RC5.jar;%APP_HOME%\lib\jaxb-utils-1.0.jar;%APP_HOME%\lib\httpcore-4.4.11.jar;%APP_HOME%\lib\commons-beanutils-1.9.3.jar;%APP_HOME%\lib\commons-logging-1.2.jar;%APP_HOME%\lib\commons-codec-1.11.jar;%APP_HOME%\lib\commons-text-1.3.jar;%APP_HOME%\lib\commons-lang3-3.9.jar;%APP_HOME%\lib\commons-collections4-4.2.jar;%APP_HOME%\lib\flexmark-util-0.50.36.jar;%APP_HOME%\lib\commons-collections-3.2.2.jar;%APP_HOME%\lib\config 83 | 84 | @rem Execute allure 85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %ALLURE_OPTS% -classpath "%CLASSPATH%" io.qameta.allure.CommandLine %CMD_LINE_ARGS% 86 | 87 | :end 88 | @rem End local scope for the variables with windows NT shell 89 | if "%ERRORLEVEL%"=="0" goto mainEnd 90 | 91 | :fail 92 | rem Set variable ALLURE_EXIT_CONSOLE if you need the _script_ return code instead of 93 | rem the _cmd.exe /c_ return code! 94 | if not "" == "%ALLURE_EXIT_CONSOLE%" exit 1 95 | exit /b 1 96 | 97 | :mainEnd 98 | if "%OS%"=="Windows_NT" endlocal 99 | 100 | :omega 101 | -------------------------------------------------------------------------------- /.allure/allure-2.13.9/config/allure-cucumber.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/config/allure-cucumber.yml -------------------------------------------------------------------------------- /.allure/allure-2.13.9/config/allure-junit.yml: -------------------------------------------------------------------------------- 1 | plugins: 2 | - junit-plugin 3 | - packages-plugin 4 | -------------------------------------------------------------------------------- /.allure/allure-2.13.9/config/allure.yml: -------------------------------------------------------------------------------- 1 | plugins: 2 | - junit-xml-plugin 3 | - xunit-xml-plugin 4 | - trx-plugin 5 | - behaviors-plugin 6 | - packages-plugin 7 | - screen-diff-plugin 8 | - xctest-plugin 9 | - jira-plugin 10 | - xray-plugin 11 | -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/allure-commandline-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/allure-commandline-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/allure-generator-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/allure-generator-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/allure-model-2.13.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/allure-model-2.13.0.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/allure-plugin-api-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/allure-plugin-api-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/allure1-model-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/allure1-model-1.0.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/commons-beanutils-1.9.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/commons-beanutils-1.9.3.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/commons-codec-1.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/commons-codec-1.11.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/commons-collections-3.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/commons-collections-3.2.2.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/commons-collections4-4.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/commons-collections4-4.2.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/commons-io-2.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/commons-io-2.6.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/commons-lang3-3.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/commons-lang3-3.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/commons-logging-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/commons-logging-1.2.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/commons-text-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/commons-text-1.3.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/config/jetty-logging.properties: -------------------------------------------------------------------------------- 1 | org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.LoggerLog 2 | org.eclipse.jetty.LEVEL=WARN -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/config/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=INFO, stdout 2 | 3 | log4j.appender.stdout = org.apache.log4j.ConsoleAppender 4 | log4j.appender.stdout.Target=System.out 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%m%n 7 | 8 | log4j.logger.org.mortbay.log = INFO -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/flexmark-0.50.36.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/flexmark-0.50.36.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/flexmark-util-0.50.36.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/flexmark-util-0.50.36.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/freemarker-2.3.29.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/freemarker-2.3.29.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/httpclient-4.5.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/httpclient-4.5.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/httpcore-4.4.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/httpcore-4.4.11.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jackson-annotations-2.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jackson-annotations-2.9.0.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jackson-core-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jackson-core-2.9.8.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jackson-databind-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jackson-databind-2.9.8.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jackson-dataformat-xml-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jackson-dataformat-xml-2.9.8.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jackson-dataformat-yaml-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jackson-dataformat-yaml-2.9.8.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jackson-module-jaxb-annotations-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jackson-module-jaxb-annotations-2.9.8.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/javax.activation-api-1.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/javax.activation-api-1.2.0.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/javax.servlet-api-3.1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/javax.servlet-api-3.1.0.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jaxb-api-2.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jaxb-api-2.3.1.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jaxb-utils-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jaxb-utils-1.0.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jcommander-1.78.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jcommander-1.78.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jetty-http-9.4.20.v20190813.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jetty-http-9.4.20.v20190813.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jetty-io-9.4.20.v20190813.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jetty-io-9.4.20.v20190813.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jetty-server-9.4.20.v20190813.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jetty-server-9.4.20.v20190813.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/jetty-util-9.4.20.v20190813.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/jetty-util-9.4.20.v20190813.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/log4j-1.2.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/log4j-1.2.17.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/opencsv-4.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/opencsv-4.6.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/properties-2.0.RC5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/properties-2.0.RC5.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/slf4j-api-1.7.28.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/slf4j-api-1.7.28.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/slf4j-log4j12-1.7.28.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/slf4j-log4j12-1.7.28.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/snakeyaml-1.23.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/snakeyaml-1.23.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/stax2-api-3.1.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/stax2-api-3.1.4.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/tika-core-1.22.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/tika-core-1.22.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/lib/woodstox-core-5.0.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/lib/woodstox-core-5.0.3.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/README.txt: -------------------------------------------------------------------------------- 1 | The directory with Allure plugins. To add the plugin simply unpack it to this folder. -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/behaviors-plugin/allure-plugin.yml: -------------------------------------------------------------------------------- 1 | id: behaviors 2 | name: Behaviors aggregator 3 | description: The aggregator adds behaviors tab to the report 4 | extensions: 5 | - io.qameta.allure.behaviors.BehaviorsPlugin 6 | jsFiles: 7 | - index.js -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/behaviors-plugin/behaviors-plugin-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/behaviors-plugin/behaviors-plugin-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/behaviors-plugin/static/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | allure.api.addTranslation('en', { 4 | tab: { 5 | behaviors: { 6 | name: 'Behaviors' 7 | } 8 | }, 9 | widget: { 10 | behaviors: { 11 | name: 'Features by stories', 12 | showAll: 'show all' 13 | } 14 | } 15 | }); 16 | 17 | allure.api.addTranslation('ru', { 18 | tab: { 19 | behaviors: { 20 | name: 'Функциональность' 21 | } 22 | }, 23 | widget: { 24 | behaviors: { 25 | name: 'Функциональность', 26 | showAll: 'показать все' 27 | } 28 | } 29 | }); 30 | 31 | allure.api.addTranslation('zh', { 32 | tab: { 33 | behaviors: { 34 | name: '功能' 35 | } 36 | }, 37 | widget: { 38 | behaviors: { 39 | name: '特性场景', 40 | showAll: '显示所有' 41 | } 42 | } 43 | }); 44 | 45 | allure.api.addTranslation('de', { 46 | tab: { 47 | behaviors: { 48 | name: 'Verhalten' 49 | } 50 | }, 51 | widget: { 52 | behaviors: { 53 | name: 'Features nach Stories', 54 | showAll: 'Zeige alle' 55 | } 56 | } 57 | }); 58 | 59 | allure.api.addTranslation('nl', { 60 | tab: { 61 | behaviors: { 62 | name: 'Functionaliteit' 63 | } 64 | }, 65 | widget: { 66 | behaviors: { 67 | name: 'Features en story’s', 68 | showAll: 'Toon alle' 69 | } 70 | } 71 | }); 72 | 73 | allure.api.addTranslation('he', { 74 | tab: { 75 | behaviors: { 76 | name: 'התנהגויות' 77 | } 78 | }, 79 | widget: { 80 | behaviors: { 81 | name: 'תכונות לפי סיפורי משתמש', 82 | showAll: 'הצג הכול' 83 | } 84 | } 85 | }); 86 | 87 | allure.api.addTranslation('br', { 88 | tab: { 89 | behaviors: { 90 | name: 'Comportamentos' 91 | } 92 | }, 93 | widget: { 94 | behaviors: { 95 | name: 'Funcionalidades por história', 96 | showAll: 'Mostrar tudo' 97 | } 98 | } 99 | }); 100 | 101 | allure.api.addTranslation('ja', { 102 | tab: { 103 | behaviors: { 104 | name: '振る舞い' 105 | } 106 | }, 107 | widget: { 108 | behaviors: { 109 | name: 'ストーリー別の機能', 110 | showAll: '全て表示' 111 | } 112 | } 113 | }); 114 | 115 | allure.api.addTranslation('es', { 116 | tab: { 117 | behaviors: { 118 | name: 'Funcionalidades' 119 | } 120 | }, 121 | widget: { 122 | behaviors: { 123 | name: 'Funcionalidades por Historias de Usuario', 124 | showAll: 'mostrar todo' 125 | } 126 | } 127 | }); 128 | 129 | allure.api.addTranslation('kr', { 130 | tab: { 131 | behaviors: { 132 | name: '동작' 133 | } 134 | }, 135 | widget: { 136 | behaviors: { 137 | name: '스토리별 기능', 138 | showAll: '전체 보기' 139 | } 140 | } 141 | }); 142 | 143 | allure.api.addTranslation('fr', { 144 | tab: { 145 | behaviors: { 146 | name: 'Comportements' 147 | } 148 | }, 149 | widget: { 150 | behaviors: { 151 | name: 'Thèmes par histoires', 152 | showAll: 'Montrer tout' 153 | } 154 | } 155 | }); 156 | 157 | allure.api.addTab('behaviors', { 158 | title: 'tab.behaviors.name', icon: 'fa fa-list', 159 | route: 'behaviors(/)(:testGroup)(/)(:testResult)(/)(:testResultTab)(/)', 160 | onEnter: (function (testGroup, testResult, testResultTab) { 161 | return new allure.components.TreeLayout({ 162 | testGroup: testGroup, 163 | testResult: testResult, 164 | testResultTab: testResultTab, 165 | tabName: 'tab.behaviors.name', 166 | baseUrl: 'behaviors', 167 | url: 'data/behaviors.json', 168 | csvUrl: 'data/behaviors.csv' 169 | }); 170 | }) 171 | }); 172 | 173 | allure.api.addWidget('widgets', 'behaviors', allure.components.WidgetStatusView.extend({ 174 | rowTag: 'a', 175 | title: 'widget.behaviors.name', 176 | baseUrl: 'behaviors', 177 | showLinks: true 178 | })); 179 | -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/custom-logo-plugin/allure-plugin.yml: -------------------------------------------------------------------------------- 1 | id: custom-logo 2 | name: Custom logo aggregator 3 | description: The aggregator replaces default Allure logo with a custom one 4 | cssFiles: 5 | - styles.css -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/custom-logo-plugin/custom-logo-plugin-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/custom-logo-plugin/custom-logo-plugin-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/custom-logo-plugin/static/custom-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/custom-logo-plugin/static/styles.css: -------------------------------------------------------------------------------- 1 | .side-nav__brand { 2 | background: url('custom-logo.svg') no-repeat left center !important; 3 | margin-left: 10px; 4 | } -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/jira-plugin/allure-plugin.yml: -------------------------------------------------------------------------------- 1 | id: jira 2 | name: Jira Plugin 3 | description: The plugin that adds support for Jira integration. 4 | extensions: 5 | - io.qameta.allure.jira.JiraExportPlugin 6 | -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/jira-plugin/jira-plugin-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/jira-plugin/jira-plugin-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/jira-plugin/lib/allure-jira-commons-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/jira-plugin/lib/allure-jira-commons-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/jira-plugin/lib/converter-jackson-2.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/jira-plugin/lib/converter-jackson-2.6.1.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/jira-plugin/lib/jackson-annotations-2.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/jira-plugin/lib/jackson-annotations-2.9.0.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/jira-plugin/lib/jackson-core-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/jira-plugin/lib/jackson-core-2.9.8.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/jira-plugin/lib/jackson-databind-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/jira-plugin/lib/jackson-databind-2.9.8.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/jira-plugin/lib/okhttp-3.12.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/jira-plugin/lib/okhttp-3.12.0.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/jira-plugin/lib/okio-1.15.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/jira-plugin/lib/okio-1.15.0.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/jira-plugin/lib/retrofit-2.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/jira-plugin/lib/retrofit-2.6.1.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/junit-xml-plugin/allure-plugin.yml: -------------------------------------------------------------------------------- 1 | id: junit 2 | name: JUnit Plugin 3 | description: The plugin that adds support for results in JUnit.xml data format. 4 | extensions: 5 | - io.qameta.allure.junitxml.JunitXmlPlugin -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/junit-xml-plugin/junit-xml-plugin-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/junit-xml-plugin/junit-xml-plugin-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/packages-plugin/allure-plugin.yml: -------------------------------------------------------------------------------- 1 | id: packages 2 | name: Packages aggregator 3 | description: The aggregator adds packages tab to the report 4 | extensions: 5 | - io.qameta.allure.packages.PackagesPlugin 6 | jsFiles: 7 | - index.js -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/packages-plugin/packages-plugin-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/packages-plugin/packages-plugin-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/packages-plugin/static/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | allure.api.addTranslation('en', { 4 | tab: { 5 | packages: { 6 | name: 'Packages' 7 | } 8 | } 9 | }); 10 | 11 | allure.api.addTranslation('ru', { 12 | tab: { 13 | packages: { 14 | name: 'Пакеты' 15 | } 16 | } 17 | }); 18 | 19 | allure.api.addTranslation('zh', { 20 | tab: { 21 | packages: { 22 | name: '包' 23 | } 24 | } 25 | }); 26 | 27 | allure.api.addTranslation('de', { 28 | tab: { 29 | packages: { 30 | name: 'Pakete' 31 | } 32 | } 33 | }); 34 | 35 | allure.api.addTranslation('nl', { 36 | tab: { 37 | packages: { 38 | name: 'Packages' 39 | } 40 | } 41 | }); 42 | 43 | allure.api.addTranslation('he', { 44 | tab: { 45 | packages: { 46 | name: 'חבילות' 47 | } 48 | } 49 | }); 50 | 51 | allure.api.addTranslation('br', { 52 | tab: { 53 | packages: { 54 | name: 'Pacotes' 55 | } 56 | } 57 | }); 58 | 59 | allure.api.addTranslation('ja', { 60 | tab: { 61 | packages: { 62 | name: 'パッケージ' 63 | } 64 | } 65 | }); 66 | 67 | allure.api.addTranslation('es', { 68 | tab: { 69 | packages: { 70 | name: 'Paquetes' 71 | } 72 | } 73 | }); 74 | 75 | allure.api.addTranslation('kr', { 76 | tab: { 77 | packages: { 78 | name: '패키지' 79 | } 80 | } 81 | }); 82 | 83 | allure.api.addTranslation('fr', { 84 | tab: { 85 | packages: { 86 | name: 'Paquets' 87 | } 88 | } 89 | }); 90 | 91 | allure.api.addTab('packages', { 92 | title: 'tab.packages.name', icon: 'fa fa-align-left', 93 | route: 'packages(/)(:testGroup)(/)(:testResult)(/)(:testResultTab)(/)', 94 | onEnter: (function (testGroup, testResult, testResultTab) { 95 | return new allure.components.TreeLayout({ 96 | testGroup: testGroup, 97 | testResult: testResult, 98 | testResultTab: testResultTab, 99 | tabName: 'tab.packages.name', 100 | baseUrl: 'packages', 101 | url: 'data/packages.json' 102 | }); 103 | }) 104 | }); 105 | -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/screen-diff-plugin/allure-plugin.yml: -------------------------------------------------------------------------------- 1 | id: screen-diff 2 | name: Screen diff 3 | description: Who cares about description by just-boris 4 | jsFiles: 5 | - index.js 6 | cssFiles: 7 | - styles.css -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/screen-diff-plugin/screen-diff-plugin-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/screen-diff-plugin/screen-diff-plugin-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/screen-diff-plugin/static/index.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var settings = allure.getPluginSettings('screen-diff', { diffType: 'diff' }); 3 | 4 | function renderImage(src) { 5 | return ( 6 | '
' + 7 | '' + 10 | '
' 11 | ); 12 | } 13 | 14 | function findImage(data, name) { 15 | if (data.testStage && data.testStage.attachments) { 16 | var matchedImage = data.testStage.attachments.filter(function (attachment) { 17 | return attachment.name === name; 18 | })[0]; 19 | if (matchedImage) { 20 | return 'data/attachments/' + matchedImage.source; 21 | } 22 | } 23 | return null; 24 | } 25 | 26 | function renderDiffContent(type, diffImage, actualImage, expectedImage) { 27 | if (type === 'diff') { 28 | if (diffImage) { 29 | return renderImage(diffImage); 30 | } 31 | } 32 | if (type === 'overlay' && expectedImage) { 33 | return ( 34 | '
' + 35 | '' + 38 | '
' + 39 | '' + 42 | '
' + 43 | '
' 44 | ); 45 | } 46 | if (actualImage) { 47 | return renderImage(actualImage); 48 | } 49 | return 'No diff data provided'; 50 | } 51 | 52 | var TestResultView = Backbone.Marionette.View.extend({ 53 | regions: { 54 | subView: '.screen-diff-view', 55 | }, 56 | template: function () { 57 | return '
'; 58 | }, 59 | onRender: function () { 60 | var data = this.model.toJSON(); 61 | var testType = data.labels.filter(function (label) { 62 | return label.name === 'testType'; 63 | })[0]; 64 | var diffImage = findImage(data, 'diff'); 65 | var actualImage = findImage(data, 'actual'); 66 | var expectedImage = findImage(data, 'expected'); 67 | if (!testType || testType.value !== 'screenshotDiff') { 68 | return; 69 | } 70 | this.showChildView( 71 | 'subView', 72 | new ScreenDiffView({ 73 | diffImage: diffImage, 74 | actualImage: actualImage, 75 | expectedImage: expectedImage, 76 | }), 77 | ); 78 | }, 79 | }); 80 | var ErrorView = Backbone.Marionette.View.extend({ 81 | templateContext: function () { 82 | return this.options; 83 | }, 84 | template: function (data) { 85 | return '
' + data.error + '
'; 86 | }, 87 | }); 88 | var AttachmentView = Backbone.Marionette.View.extend({ 89 | regions: { 90 | subView: '.screen-diff-view', 91 | }, 92 | template: function () { 93 | return '
'; 94 | }, 95 | onRender: function () { 96 | jQuery 97 | .getJSON(this.options.sourceUrl) 98 | .then(this.renderScreenDiffView.bind(this), this.renderErrorView.bind(this)); 99 | }, 100 | renderErrorView: function (error) { 101 | console.log(error); 102 | this.showChildView( 103 | 'subView', 104 | new ErrorView({ 105 | error: error.statusText, 106 | }), 107 | ); 108 | }, 109 | renderScreenDiffView: function (data) { 110 | this.showChildView( 111 | 'subView', 112 | new ScreenDiffView({ 113 | diffImage: data.diff, 114 | actualImage: data.actual, 115 | expectedImage: data.expected, 116 | }), 117 | ); 118 | }, 119 | }); 120 | 121 | var ScreenDiffView = Backbone.Marionette.View.extend({ 122 | className: 'pane__section', 123 | events: function () { 124 | return { 125 | ['click [name="screen-diff-type-' + this.cid + '"]']: 'onDiffTypeChange', 126 | 'mousemove .screen-diff__overlay': 'onOverlayMove', 127 | }; 128 | }, 129 | initialize: function (options) { 130 | this.diffImage = options.diffImage; 131 | this.actualImage = options.actualImage; 132 | this.expectedImage = options.expectedImage; 133 | this.radioName = 'screen-diff-type-' + this.cid; 134 | }, 135 | templateContext: function () { 136 | return { 137 | diffType: settings.get('diffType'), 138 | diffImage: this.diffImage, 139 | actualImage: this.actualImage, 140 | expectedImage: this.expectedImage, 141 | radioName: this.radioName, 142 | }; 143 | }, 144 | template: function (data) { 145 | if (!data.diffImage && !data.actualImage && !data.expectedImage) { 146 | return ''; 147 | } 148 | 149 | return ( 150 | '

Screen Diff

' + 151 | '
' + 152 | '
' + 153 | '' + 156 | '' + 159 | '
' + 160 | renderDiffContent( 161 | data.diffType, 162 | data.diffImage, 163 | data.actualImage, 164 | data.expectedImage, 165 | ) + 166 | '
' 167 | ); 168 | }, 169 | adjustImageSize: function (event) { 170 | var overImage = this.$(event.target); 171 | overImage.width(overImage.width()); 172 | }, 173 | onRender: function () { 174 | const diffType = settings.get('diffType'); 175 | this.$('[name="' + this.radioName + '"][value="' + diffType + '"]').prop( 176 | 'checked', 177 | true, 178 | ); 179 | if (diffType === 'overlay') { 180 | this.$('.screen-diff__image-over img').on('load', this.adjustImageSize.bind(this)); 181 | } 182 | }, 183 | onOverlayMove: function (event) { 184 | var pageX = event.pageX; 185 | var containerScroll = this.$('.screen-diff__container').scrollLeft(); 186 | var elementX = event.currentTarget.getBoundingClientRect().left; 187 | var delta = pageX - elementX + containerScroll; 188 | this.$('.screen-diff__image-over').width(delta); 189 | }, 190 | onDiffTypeChange: function (event) { 191 | settings.save('diffType', event.target.value); 192 | this.render(); 193 | }, 194 | }); 195 | allure.api.addTestResultBlock(TestResultView, { position: 'before' }); 196 | allure.api.addAttachmentViewer('application/vnd.allure.image.diff', { 197 | View: AttachmentView, 198 | icon: 'fa fa-exchange', 199 | }); 200 | })(); 201 | -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/screen-diff-plugin/static/styles.css: -------------------------------------------------------------------------------- 1 | .screen-diff__switchers { 2 | margin-bottom: 1em; 3 | } 4 | 5 | .screen-diff__switchers label + label { 6 | margin-left: 1em; 7 | } 8 | 9 | .screen-diff__overlay { 10 | position: relative; 11 | cursor: col-resize; 12 | } 13 | 14 | .screen-diff__container { 15 | overflow-x: auto; 16 | } 17 | 18 | .screen-diff__image-over { 19 | top: 0; 20 | left: 0; 21 | bottom: 0; 22 | background: #fff; 23 | position: absolute; 24 | overflow: hidden; 25 | box-shadow: 2px 0 1px -1px #aaa; 26 | } 27 | 28 | .screen-diff-error { 29 | color: #fd5a3e; 30 | } 31 | -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/trx-plugin/allure-plugin.yml: -------------------------------------------------------------------------------- 1 | id: trx 2 | name: XUnit TRX Plugin 3 | description: The plugin that adds support for results TRX data format. 4 | extensions: 5 | - io.qameta.allure.trx.TrxPlugin -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/trx-plugin/trx-plugin-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/trx-plugin/trx-plugin-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xctest-plugin/allure-plugin.yml: -------------------------------------------------------------------------------- 1 | id: xctest 2 | name: XCTest Plugin 3 | description: The plugin that adds support for results XCTest data format. 4 | extensions: 5 | - io.qameta.allure.xctest.XcTestPlugin -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xctest-plugin/lib/xmlwise-1.2.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/xctest-plugin/lib/xmlwise-1.2.11.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xctest-plugin/xctest-plugin-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/xctest-plugin/xctest-plugin-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xray-plugin/allure-plugin.yml: -------------------------------------------------------------------------------- 1 | id: xray 2 | name: Xray Plugin 3 | description: The plugin that adds support for Xray integration. 4 | extensions: 5 | - io.qameta.allure.xray.XrayTestRunExportPlugin 6 | -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xray-plugin/lib/allure-jira-commons-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/xray-plugin/lib/allure-jira-commons-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xray-plugin/lib/converter-jackson-2.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/xray-plugin/lib/converter-jackson-2.6.1.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xray-plugin/lib/jackson-annotations-2.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/xray-plugin/lib/jackson-annotations-2.9.0.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xray-plugin/lib/jackson-core-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/xray-plugin/lib/jackson-core-2.9.8.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xray-plugin/lib/jackson-databind-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/xray-plugin/lib/jackson-databind-2.9.8.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xray-plugin/lib/okhttp-3.12.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/xray-plugin/lib/okhttp-3.12.0.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xray-plugin/lib/okio-1.15.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/xray-plugin/lib/okio-1.15.0.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xray-plugin/lib/retrofit-2.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/xray-plugin/lib/retrofit-2.6.1.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xray-plugin/xray-plugin-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/xray-plugin/xray-plugin-2.13.9.jar -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xunit-xml-plugin/allure-plugin.yml: -------------------------------------------------------------------------------- 1 | id: xunit-xml 2 | name: XUnit XML v2 Plugin 3 | description: The plugin that adds support for results in Xunit.net xml data format. 4 | extensions: 5 | - io.qameta.allure.xunitxml.XunitXmlPlugin -------------------------------------------------------------------------------- /.allure/allure-2.13.9/plugins/xunit-xml-plugin/xunit-xml-plugin-2.13.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/.allure/allure-2.13.9/plugins/xunit-xml-plugin/xunit-xml-plugin-2.13.9.jar -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/uiDesigner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 259 | 260 | 261 | 262 | httpClient 263 | 结果 264 | 执行结果 265 | getResourceAsStream 266 | src\\test\\ 267 | 请求返回结果222 268 | System.out.println 269 | 270 | 271 | 272 | 273 | 274 | D:\myjava\apiAutoTest 275 | D:\myjava\github\apiAutoTest 276 | 277 | 278 | 279 | 281 | 282 | 330 | 331 | 332 | 333 | 334 | true 335 | DEFINITION_ORDER 336 | 337 | 338 | 344 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 438 | 439 | 440 | 441 | 443 | 444 | 457 | 458 | 459 | 460 | 469 | 470 | 486 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 1663155824733 499 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 617 | 618 | 620 | 621 | 622 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | 686 | 687 | 688 | 689 | 690 | 691 | 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 752 | 753 | 754 | 755 | 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 777 | 778 | 779 | 780 | 781 | 782 | 783 | 784 | 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | 793 | 794 | 795 | 796 | 797 | 798 | 799 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 832 | 833 | 834 | 835 | 836 | 837 | 838 | 839 | 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | 854 | 855 | 856 | 857 | 858 | 859 | 860 | 861 | 862 | 863 | 864 | 865 | 866 | 867 | 868 | 869 | 870 | 871 | 872 | 873 | 874 | 875 | 876 | 881 | 882 | 883 | 884 | 885 | 886 | No facets are configured 887 | 888 | 893 | 894 | 895 | 896 | 897 | 898 | 899 | 904 | 905 | 906 | 907 | 908 | 909 | 1.8 910 | 911 | 916 | 917 | 918 | 919 | 920 | 921 | apiautotest 922 | 923 | 929 | 930 | 931 | 932 | 933 | 934 | 1.8 935 | 936 | 941 | 942 | 943 | 944 | 945 | 946 | 947 | 952 | 953 | 954 | 955 | 956 | 957 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 设计思路、实现过程 2 | - 主要技术栈:java + testng + httpclient + allure + fastjson + jsonpath + poi/yaml + log4j 3 | - [**设计思路、实现过程**](https://www.cnblogs.com/uncleyong/p/15867903.html)(←点击查看) 4 | 5 | 6 | 7 | # 效果 8 | - ![gif效果](https://gitee.com/qzcsbj/pic/raw/master/%E3%80%90%E6%95%88%E6%9E%9C%E3%80%91java_auto_test.gif) 9 | - ![报告截图](https://gitee.com/qzcsbj/pic/raw/master/allure-report-testng.png) 10 | 11 | 12 | # 自动化测试框架(汇总) 13 | 14 | ## 干货分享 15 | - [**从测试小白到高级测试修炼之路,持续更新中**](https://www.cnblogs.com/uncleyong/p/10530261.html)(←点击查看) 16 | - [**学习环境、自动化、持续集成、性能、测开实战、简历、笔试面试、职业规划**](https://www.cnblogs.com/uncleyong/p/15777706.html)(←点击查看) 17 | 18 | 19 | ## 自动化框架清单(欢迎交流、斧正、指导) 20 | ### [**已完成框架**](https://www.cnblogs.com/uncleyong/p/10650552.html)(←点击查看) 21 | ##### 写代码版 22 | - [X] python基础入门版:/dev01/ 23 | - [X] unittest + 关联 + excle + ddt:/dev02/ 24 | - [X] 自己造轮子(未使用unittest、pytest等):/dev04/ 25 | - [X] 自己造轮子(未使用unittest、pytest等,dev04升级版):/dev05/ 26 | - [X] python进阶版:python + pytest + pyyaml + requests + allure + jsonpath + pymysql + loguru 27 | - [X] java版:java + testng + httpclient + allure + fastjson + jsonpath + poi/yaml + log4j 28 | ##### 不写代码版 29 | - [X] JMeter + Ant + Jenkins【 windows 版】 30 | - [X] JMeter + Ant + Jenkins【 linux 版】 31 | - [X] JMeter + Maven + Jenkins 32 | 33 | ## 测试咨询、交流 34 | - 咨询测试问题,请加**微信:ren168632201** 35 |
微信:ren168632201
36 | - 更多测试干货,请关注**微信公众号:全栈测试笔记** 37 |
微信公众号:全栈测试笔记
38 | -------------------------------------------------------------------------------- /caseData/caseData.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/caseData/caseData.xlsx -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.qzcsbj.autotest 8 | apiautotest 9 | 1.0-SNAPSHOT 10 | 11 | 12 | 13 | 14 | dom4j 15 | dom4j 16 | 1.6.1 17 | 18 | 19 | 20 | mysql 21 | mysql-connector-java 22 | 5.1.47 23 | 24 | 25 | 26 | org.testng 27 | testng 28 | 6.8.8 29 | test 30 | 31 | 32 | 33 | org.apache.httpcomponents 34 | httpclient 35 | 4.5.6 36 | 37 | 38 | 39 | org.apache.poi 40 | poi-ooxml 41 | 4.1.2 42 | 43 | 44 | 45 | com.alibaba 46 | fastjson 47 | 1.2.75 48 | 49 | 50 | 51 | com.jayway.jsonpath 52 | json-path 53 | 2.4.0 54 | 55 | 56 | org.json 57 | json 58 | 20160810 59 | 60 | 61 | 62 | log4j 63 | log4j 64 | 1.2.17 65 | 66 | 67 | 68 | org.slf4j 69 | slf4j-log4j12 70 | 1.7.21 71 | test 72 | 73 | 74 | com.relevantcodes 75 | extentreports 76 | 2.41.1 77 | 78 | 79 | com.vimalselvam 80 | testng-extentsreport 81 | 1.3.1 82 | 83 | 84 | com.aventstack 85 | extentreports 86 | 3.0.6 87 | 88 | 89 | 90 | io.qameta.allure 91 | allure-testng 92 | 2.8.1 93 | 94 | 95 | org.yaml 96 | snakeyaml 97 | 1.23 98 | 99 | 100 | 101 | UTF-8 102 | 1.8.10 103 | 104 | 105 | 106 | 107 | org.apache.maven.plugins 108 | maven-compiler-plugin 109 | 110 | 7 111 | 7 112 | 113 | 114 | 115 | org.apache.maven.plugins 116 | maven-surefire-plugin 117 | 2.18.1 118 | 119 | -Dfile.encoding=UTF-8 120 | 121 | -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar" 122 | 123 | 124 | testngXML/testng.xml 125 | 126 | 127 | 128 | usedefaultlisteners 129 | false 130 | 131 | 132 | target/ 133 | 134 | 135 | 136 | org.aspectj 137 | aspectjweaver 138 | ${aspectj.version} 139 | 140 | 141 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/entity/CaseData.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.entity; 2 | 3 | /** 4 | * @博客 : www.cnblogs.com/uncleyong 5 | * @微信 : ren168632201 6 | * @描述 : 7 | */ 8 | public class CaseData { 9 | private String caseId; 10 | private String apiName; 11 | private String describe; 12 | private String url; 13 | private String requestType; 14 | private String headers; 15 | private String cookies; 16 | private String parameters; 17 | private String uploadFile; 18 | private String initSql; 19 | private String globalVariables; 20 | private String assertFields; 21 | 22 | public String getCaseId() { 23 | return caseId; 24 | } 25 | 26 | public void setCaseId(String caseId) { 27 | this.caseId = caseId; 28 | } 29 | 30 | public String getApiName() { 31 | return apiName; 32 | } 33 | 34 | public void setApiName(String apiName) { 35 | this.apiName = apiName; 36 | } 37 | 38 | public String getDescribe() { 39 | return describe; 40 | } 41 | 42 | public void setDescribe(String describe) { 43 | this.describe = describe; 44 | } 45 | 46 | public String getUrl() { 47 | return url; 48 | } 49 | 50 | public void setUrl(String url) { 51 | this.url = url; 52 | } 53 | 54 | public String getRequestType() { 55 | return requestType; 56 | } 57 | 58 | public void setRequestType(String requestType) { 59 | this.requestType = requestType; 60 | } 61 | 62 | public String getHeaders() { 63 | return headers; 64 | } 65 | 66 | public void setHeaders(String headers) { 67 | this.headers = headers; 68 | } 69 | 70 | public String getCookies() { 71 | return cookies; 72 | } 73 | 74 | public void setCookies(String cookies) { 75 | this.cookies = cookies; 76 | } 77 | 78 | public String getParameters() { 79 | return parameters; 80 | } 81 | 82 | public void setParameters(String parameters) { 83 | this.parameters = parameters; 84 | } 85 | 86 | public String getUploadFile() { 87 | return uploadFile; 88 | } 89 | 90 | public void setUploadFile(String uploadFile) { 91 | this.uploadFile = uploadFile; 92 | } 93 | 94 | public String getInitSql() { 95 | return initSql; 96 | } 97 | 98 | public void setInitSql(String initSql) { 99 | this.initSql = initSql; 100 | } 101 | 102 | public String getGlobalVariables() { 103 | return globalVariables; 104 | } 105 | 106 | public void setGlobalVariables(String globalVariables) { 107 | this.globalVariables = globalVariables; 108 | } 109 | 110 | public String getAssertFields() { 111 | return assertFields; 112 | } 113 | 114 | public void setAssertFields(String assertFields) { 115 | this.assertFields = assertFields; 116 | } 117 | 118 | @Override 119 | public String toString() { 120 | return "CaseData{" + 121 | "caseId='" + caseId + '\'' + 122 | ", apiName='" + apiName + '\'' + 123 | ", describe='" + describe + '\'' + 124 | ", url='" + url + '\'' + 125 | ", requestType='" + requestType + '\'' + 126 | ", headers='" + headers + '\'' + 127 | ", cookies='" + cookies + '\'' + 128 | ", parameters='" + parameters + '\'' + 129 | ", uploadFile='" + uploadFile + '\'' + 130 | ", initSql='" + initSql + '\'' + 131 | ", globalVariables='" + globalVariables + '\'' + 132 | ", assertFields='" + assertFields + '\'' + 133 | '}'; 134 | } 135 | } 136 | 137 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/entity/InitSqlRes.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.entity; 2 | 3 | import java.util.Map; 4 | 5 | /** 6 | * @公众号 : 全栈测试笔记 7 | * @博客 : www.cnblogs.com/uncleyong 8 | * @微信 : ren168632201 9 | * @描述 : <数据库执行结果实体类> 10 | */ 11 | public class InitSqlRes { 12 | private String no; // sql编号 13 | private Map titleAndCellValue; // sql执行结果,key是字段名,value是对应字段的查询结果 14 | 15 | public String getNo() { 16 | return no; 17 | } 18 | 19 | public void setNo(String no) { 20 | this.no = no; 21 | } 22 | 23 | public Map getTitleAndCellValue() { 24 | return titleAndCellValue; 25 | } 26 | 27 | public void setTitleAndCellValue(Map titleAndCellValue) { 28 | this.titleAndCellValue = titleAndCellValue; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/entity/Sql.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.entity; 2 | 3 | /** 4 | * @公众号 : 全栈测试笔记 5 | * @博客 : www.cnblogs.com/uncleyong 6 | * @微信 : ren168632201 7 | * @描述 : <> 8 | */ 9 | public class Sql { 10 | private String sqlNo; 11 | private String sql; 12 | 13 | public String getSqlNo() { 14 | return sqlNo; 15 | } 16 | 17 | public void setSqlNo(String sqlNo) { 18 | this.sqlNo = sqlNo; 19 | } 20 | 21 | public String getSql() { 22 | return sql; 23 | } 24 | 25 | public void setSql(String sql) { 26 | this.sql = sql; 27 | } 28 | 29 | @Override 30 | public String toString() { 31 | return "Sql{" + 32 | "sqlNo='" + sqlNo + '\'' + 33 | ", sql='" + sql + '\'' + 34 | '}'; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/entity/Variable.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.entity; 2 | 3 | /** 4 | * @公众号 : 全栈测试笔记 5 | * @博客 : www.cnblogs.com/uncleyong 6 | * @微信 : ren168632201 7 | * @描述 : <> 8 | */ 9 | public class Variable { 10 | private String name; 11 | private String value; 12 | private String description; 13 | 14 | public String getName() { 15 | return name; 16 | } 17 | 18 | public void setName(String name) { 19 | this.name = name; 20 | } 21 | 22 | public String getValue() { 23 | return value; 24 | } 25 | 26 | public void setValue(String value) { 27 | this.value = value; 28 | } 29 | 30 | public String getDescription() { 31 | return description; 32 | } 33 | 34 | public void setDescription(String description) { 35 | this.description = description; 36 | } 37 | 38 | @Override 39 | public String toString() { 40 | return "Variable{" + 41 | "name='" + name + '\'' + 42 | ", value='" + value + '\'' + 43 | ", description='" + description + '\'' + 44 | '}'; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/listener/ExtentTestNGIReporterListener.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.listener; 2 | 3 | 4 | import com.aventstack.extentreports.ExtentReports; 5 | import com.aventstack.extentreports.ExtentTest; 6 | import com.aventstack.extentreports.ResourceCDN; 7 | import com.aventstack.extentreports.Status; 8 | import com.aventstack.extentreports.model.TestAttribute; 9 | import com.aventstack.extentreports.reporter.ExtentHtmlReporter; 10 | import com.aventstack.extentreports.reporter.configuration.ChartLocation; 11 | import com.aventstack.extentreports.reporter.configuration.Theme; 12 | import org.testng.*; 13 | import org.testng.xml.XmlSuite; 14 | 15 | import java.io.File; 16 | import java.text.SimpleDateFormat; 17 | import java.util.*; 18 | 19 | public class ExtentTestNGIReporterListener implements IReporter { 20 | // 生成报告的路径 21 | private static final String OUTPUT_FOLDER = "testReport/"; 22 | // 生成报告的文件名 23 | // private static final String FILE_NAME = "qzcsbj接口自动化测试报告.html"; 24 | static Date date = new Date(); 25 | static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd_HH_mm_ss E "); 26 | private static String FILE_NAME = simpleDateFormat.format(date) + "qzcsbj接口自动化测试报告.html"; 27 | 28 | private ExtentReports extent; 29 | 30 | @Override 31 | public void generateReport(List xmlSuites, List suites, String outputDirectory) { 32 | init(); 33 | boolean createSuiteNode = false; 34 | if(suites.size()>1){ 35 | createSuiteNode=true; 36 | } 37 | for (ISuite suite : suites) { 38 | Map result = suite.getResults(); 39 | //如果suite里面没有任何用例,直接跳过,不在报告里生成 40 | if(result.size()==0){ 41 | continue; 42 | } 43 | //统计suite下的成功、失败、跳过的总用例数 44 | int suiteFailSize=0; 45 | int suitePassSize=0; 46 | int suiteSkipSize=0; 47 | ExtentTest suiteTest=null; 48 | //存在多个suite的情况下,在报告中将同一个一个suite的测试结果归为一类,创建一级节点。 49 | if(createSuiteNode){ 50 | suiteTest = extent.createTest(suite.getName()).assignCategory(suite.getName()); 51 | } 52 | boolean createSuiteResultNode = false; 53 | if(result.size()>1){ 54 | createSuiteResultNode=true; 55 | } 56 | for (ISuiteResult r : result.values()) { 57 | ExtentTest resultNode; 58 | ITestContext context = r.getTestContext(); 59 | if(createSuiteResultNode){ 60 | //没有创建suite的情况下,将在SuiteResult的创建为一级节点,否则创建为suite的一个子节点。 61 | if( null == suiteTest){ 62 | resultNode = extent.createTest(r.getTestContext().getName()); 63 | }else{ 64 | resultNode = suiteTest.createNode(r.getTestContext().getName()); 65 | } 66 | }else{ 67 | resultNode = suiteTest; 68 | } 69 | if(resultNode != null){ 70 | resultNode.getModel().setName(suite.getName()+" : "+r.getTestContext().getName()); 71 | if(resultNode.getModel().hasCategory()){ 72 | resultNode.assignCategory(r.getTestContext().getName()); 73 | }else{ 74 | resultNode.assignCategory(suite.getName(),r.getTestContext().getName()); 75 | } 76 | resultNode.getModel().setStartTime(r.getTestContext().getStartDate()); 77 | resultNode.getModel().setEndTime(r.getTestContext().getEndDate()); 78 | //统计SuiteResult下的数据 79 | int passSize = r.getTestContext().getPassedTests().size(); 80 | int failSize = r.getTestContext().getFailedTests().size(); 81 | int skipSize = r.getTestContext().getSkippedTests().size(); 82 | suitePassSize += passSize; 83 | suiteFailSize += failSize; 84 | suiteSkipSize += skipSize; 85 | if(failSize>0){ 86 | resultNode.getModel().setStatus(Status.FAIL); 87 | } 88 | resultNode.getModel().setDescription(String.format("Pass: %s ; Fail: %s ; Skip: %s ;",passSize,failSize,skipSize)); 89 | } 90 | buildTestNodes(resultNode,context.getFailedTests(), Status.FAIL); 91 | buildTestNodes(resultNode,context.getSkippedTests(), Status.SKIP); 92 | buildTestNodes(resultNode,context.getPassedTests(), Status.PASS); 93 | } 94 | if(suiteTest!= null){ 95 | suiteTest.getModel().setDescription(String.format("Pass: %s ; Fail: %s ; Skip: %s ;",suitePassSize,suiteFailSize,suiteSkipSize)); 96 | if(suiteFailSize>0){ 97 | suiteTest.getModel().setStatus(Status.FAIL); 98 | } 99 | } 100 | 101 | } 102 | // for (String s : Reporter.getOutput()) { 103 | // extent.setTestRunnerOutput(s); 104 | // } 105 | 106 | extent.flush(); 107 | } 108 | 109 | private void init() { 110 | //文件夹不存在的话进行创建 111 | File reportDir= new File(OUTPUT_FOLDER); 112 | if(!reportDir.exists()&& !reportDir .isDirectory()){ 113 | reportDir.mkdir(); 114 | } 115 | ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(OUTPUT_FOLDER + FILE_NAME); 116 | // 设置静态文件的DNS 117 | //怎么样解决cdn.rawgit.com访问不了的情况 118 | htmlReporter.config().setResourceCDN(ResourceCDN.EXTENTREPORTS); 119 | 120 | htmlReporter.config().setDocumentTitle("qzcsbj接口自动化测试报告"); 121 | htmlReporter.config().setReportName("qzcsbj接口自动化测试报告"); 122 | htmlReporter.config().setChartVisibilityOnOpen(true); 123 | htmlReporter.config().setTestViewChartLocation(ChartLocation.TOP); 124 | htmlReporter.config().setTheme(Theme.STANDARD); 125 | htmlReporter.config().setCSS(".node.level-1 ul{ display:none;} .node.level-1.active ul{display:block;}"); 126 | extent = new ExtentReports(); 127 | extent.attachReporter(htmlReporter); 128 | extent.setReportUsesManualConfiguration(true); 129 | } 130 | 131 | private void buildTestNodes(ExtentTest extenttest, IResultMap tests, Status status) { 132 | //存在父节点时,获取父节点的标签 133 | String[] categories=new String[0]; 134 | if(extenttest != null ){ 135 | List categoryList = extenttest.getModel().getCategoryContext().getAll(); 136 | categories = new String[categoryList.size()]; 137 | for(int index=0;index 0) { 145 | //调整用例排序,按时间排序 146 | Set treeSet = new TreeSet(new Comparator() { 147 | @Override 148 | public int compare(ITestResult o1, ITestResult o2) { 149 | return o1.getStartMillis()0){ 161 | if(name.length()>50){ 162 | name= name.substring(0,49)+"..."; 163 | } 164 | }else{ 165 | name = result.getMethod().getMethodName(); 166 | } 167 | if(extenttest==null){ 168 | test = extent.createTest(name); 169 | }else{ 170 | //作为子节点进行创建时,设置同父节点的标签一致,便于报告检索。 171 | test = extenttest.createNode(name).assignCategory(categories); 172 | } 173 | //test.getModel().setDescription(description.toString()); 174 | //test = extent.createTest(result.getMethod().getMethodName()); 175 | for (String group : result.getMethod().getGroups()) 176 | test.assignCategory(group); 177 | 178 | List outputList = Reporter.getOutput(result); 179 | for(String output:outputList){ 180 | //将用例的log输出报告中 181 | test.debug(output); 182 | } 183 | if (result.getThrowable() != null) { 184 | test.log(status, result.getThrowable()); 185 | } 186 | else { 187 | test.log(status, "Test " + status.toString().toLowerCase() + "ed"); 188 | } 189 | 190 | test.getModel().setStartTime(getTime(result.getStartMillis())); 191 | test.getModel().setEndTime(getTime(result.getEndMillis())); 192 | } 193 | } 194 | } 195 | 196 | private Date getTime(long millis) { 197 | Calendar calendar = Calendar.getInstance(); 198 | calendar.setTimeInMillis(millis); 199 | return calendar.getTime(); 200 | } 201 | } -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/testcase/BaseCase.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.testcase; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.qzcsbj.autotest.entity.CaseData; 5 | import com.qzcsbj.autotest.entity.Variable; 6 | import com.qzcsbj.autotest.utils.*; 7 | import org.apache.http.impl.client.CloseableHttpClient; 8 | import org.apache.log4j.Logger; 9 | import org.testng.annotations.*; 10 | import org.testng.annotations.Optional; 11 | 12 | import java.util.*; 13 | import java.util.regex.Pattern; 14 | 15 | /** 16 | * @博客 : www.cnblogs.com/uncleyong 17 | * @微信 : ren168632201 18 | * @描述 : <> 19 | */ 20 | public class BaseCase{ 21 | public static Logger logger = Logger.getLogger(BaseCase.class); 22 | 23 | // ip 24 | // public static String ip; 25 | 26 | // 端口 27 | // public static String port; 28 | 29 | // HttpClient对象 30 | // public static CloseableHttpClient httpClient; 31 | 32 | // public static BasicCookieStore basicCookieStore = new BasicCookieStore(); 33 | // Header header = null; 34 | 35 | // 存放全局变量 36 | public static Map globalVariableMap = new HashMap(); 37 | 38 | // 替换符 39 | public static Pattern replaceParamPattern = Pattern.compile("\\$\\{(.*?)\\}"); 40 | 41 | // 保存所有用例对象 42 | public static List cases = new ArrayList(); 43 | 44 | // 存放变量对象 45 | public static List variables = new ArrayList<>(); 46 | 47 | 48 | 49 | @Test(dataProvider = "datasFromExcel", timeOut = 5000) 50 | public void test(CaseData caseData){ 51 | // 获取对象中的数据 52 | String url = caseData.getUrl(); 53 | String requestType = caseData.getRequestType(); 54 | String headers = caseData.getHeaders(); 55 | // String cookies = caseData.getCookies(); // 暂未涉及 56 | String parameters = caseData.getParameters(); 57 | // String uploadFile = caseData.getUploadFile(); // 暂未涉及 58 | String initSql = caseData.getInitSql(); 59 | String globalVariables = caseData.getGlobalVariables(); 60 | String assertFields = caseData.getAssertFields(); 61 | 62 | 63 | url = "http://" + PropertiesUtil.getIp() + ":"+ PropertiesUtil.getPort() + url; 64 | 65 | // 执行初始化sql 66 | if (initSql!=null && initSql.trim().length()>0){ 67 | // 替换sql中的参数 68 | initSql = VariableUtil.variableSubstitution(initSql); 69 | 70 | // 调用方法 71 | String initSqlRes = InitSqlUtil.doInitSql(initSql); 72 | } 73 | 74 | 75 | // 替换入参中的非关联参数 76 | parameters = VariableUtil.variableSubstitution(parameters); 77 | // 替换入参中的关联参数 78 | parameters = GlobalVariableUtil.substitutionGlobalVariable(parameters); 79 | 80 | String actual = null; 81 | JSONObject headsJsonObject = JSONObject.parseObject(headers); 82 | if (headsJsonObject!=null && "application/json".equals(headsJsonObject.getString("Content-Type"))){ 83 | JSONObject paramJsonObject = JSONObject.parseObject(parameters); 84 | 85 | // 请求 86 | actual = HttpRequestJsonUtil.sendRequest(url, requestType, paramJsonObject,headsJsonObject); 87 | logger.info("json请求返回结果: " + actual); 88 | 89 | } else { 90 | HashMap params = new HashMap(); 91 | JSONObject jsonObject = JSONObject.parseObject(parameters); 92 | Set keys = jsonObject.keySet(); 93 | for (String key : keys) { 94 | params.put(key, jsonObject.getString(key)); 95 | } 96 | 97 | 98 | // 请求,获取结果 99 | actual = HttpRequestUtil.sendRequest(url, requestType, params); 100 | logger.info("k-v请求返回结果: " + actual); 101 | } 102 | 103 | // 是否需要保存全局变量 104 | if (StringUtil.isNotNullAndEmpty(globalVariables)){ 105 | GlobalVariableUtil.saveGlobalVariable(actual, globalVariables); 106 | } 107 | 108 | // 是否需要断言关键字段 109 | if (StringUtil.isNotNullAndEmpty(assertFields)){ 110 | AssertUtil.getFieldsAssertRes(actual, assertFields); 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/testcase/BaseSuite.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.testcase; 2 | 3 | import org.testng.annotations.AfterSuite; 4 | import org.testng.annotations.BeforeSuite; 5 | 6 | /** 7 | * @公众号 : 全栈测试笔记 8 | * @博客 : www.cnblogs.com/uncleyong 9 | * @微信 : ren168632201 10 | * @描述 : <> 11 | */ 12 | public class BaseSuite { 13 | @BeforeSuite 14 | public void beforeSuite(){ 15 | System.out.println(this.getClass().getSimpleName() + " -> " + new Throwable().getStackTrace()[0].getMethodName()); 16 | } 17 | 18 | @AfterSuite 19 | public void afterSuite(){ 20 | System.out.println(this.getClass().getSimpleName() + " -> " + new Throwable().getStackTrace()[0].getMethodName()); 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/testcase/BaseTest.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.testcase; 2 | 3 | import org.testng.annotations.AfterTest; 4 | import org.testng.annotations.BeforeTest; 5 | 6 | /** 7 | * @公众号 : 全栈测试笔记 8 | * @博客 : www.cnblogs.com/uncleyong 9 | * @微信 : ren168632201 10 | * @描述 : <> 11 | */ 12 | // public class BaseTest extends BaseSuite { 13 | public class BaseTest { 14 | // public static CloseableHttpClient httpClient; 15 | // public static BasicCookieStore basicCookieStore = new BasicCookieStore(); 16 | // Header header = null; 17 | 18 | @BeforeTest 19 | public void beforeTest(){ 20 | // httpClient = HttpClients.custom().setDefaultCookieStore(basicCookieStore).build(); 21 | // header = new BasicHeader("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"); 22 | 23 | System.out.println(this.getClass().getSimpleName() + " -> " + new Throwable().getStackTrace()[0].getMethodName()); 24 | } 25 | 26 | @AfterTest 27 | public void afterTest(){ 28 | System.out.println(this.getClass().getSimpleName() + " -> " + new Throwable().getStackTrace()[0].getMethodName()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/testcase/DemoCase.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.testcase; 2 | 3 | import com.qzcsbj.autotest.entity.CaseData; 4 | import com.qzcsbj.autotest.entity.Variable; 5 | import com.qzcsbj.autotest.utils.ExcelUtil; 6 | import com.qzcsbj.autotest.utils.VariableUtil; 7 | import org.testng.annotations.BeforeTest; 8 | import org.testng.annotations.DataProvider; 9 | import org.testng.annotations.Optional; 10 | import org.testng.annotations.Parameters; 11 | 12 | import java.util.ArrayList; 13 | import java.util.Iterator; 14 | import java.util.List; 15 | 16 | /** 17 | * @公众号 : 全栈测试笔记 18 | * @博客 : www.cnblogs.com/uncleyong 19 | * @微信 : ren168632201 20 | * @描述 : <> 21 | */ 22 | public class DemoCase extends BaseCase{ 23 | @Parameters({ "excelPath", "dataSheetName", "variableSheetName"}) 24 | @BeforeTest 25 | public void readDataFromExcel(@Optional("caseData/caseData.xlsx") String excelPath, @Optional("v4_scenesCase") String dataSheetName, @Optional("variables") String variableSheetName){ 26 | cases = ExcelUtil.loadExcel(excelPath, dataSheetName, CaseData.class); 27 | variables = ExcelUtil.loadExcel(excelPath, variableSheetName, Variable.class); 28 | VariableUtil.loadVariablesToMap(variables); 29 | } 30 | 31 | @DataProvider(name = "datasFromExcel") 32 | public Iterator getCaseDatas(){ 33 | // 说明:如果测试用例没有封装到对象中,那么可以循环excel单元格,把值可以放到map中(参见博客样例) 34 | List apiDataList = new ArrayList(); 35 | for (CaseData caseData : cases){ 36 | apiDataList.add(new Object[] { caseData }); 37 | } 38 | return apiDataList.iterator(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/utils/AssertUtil.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.utils; 2 | 3 | import com.jayway.jsonpath.Configuration; 4 | import com.jayway.jsonpath.JsonPath; 5 | import org.testng.Assert; 6 | 7 | /** 8 | * @公众号 : 全栈测试笔记 9 | * @博客 : www.cnblogs.com/uncleyong 10 | * @微信 : ren168632201 11 | * @描述 : <> 12 | */ 13 | public class AssertUtil { 14 | // 断言字段 15 | public static void getFieldsAssertRes(String actual, String assertFields){ 16 | if (StringUtil.isNotNullAndEmpty(actual)){ 17 | String key,value; 18 | Object document = Configuration.defaultConfiguration().jsonProvider().parse(actual); 19 | String[] assertFieldarr = assertFields.split(";"); 20 | for (String assertField : assertFieldarr) { 21 | if (StringUtil.isNotNullAndEmpty(assertField)){ 22 | key = assertField.split("=")[0].trim(); 23 | value = assertField.split("=")[1].trim(); 24 | String key_real = JsonPath.read(document, key).toString(); 25 | Assert.assertEquals(key_real, value); 26 | } else { 27 | Assert.fail("assertField is null or empty"); 28 | } 29 | } 30 | } else { 31 | Assert.fail("actual is null or empty"); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/utils/ExcelUtil.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.utils; 2 | 3 | 4 | import org.apache.log4j.Logger; 5 | import org.apache.poi.ss.usermodel.*; 6 | import java.io.*; 7 | import java.lang.reflect.Method; 8 | import java.util.*; 9 | 10 | /** 11 | * @博客 : www.cnblogs.com/uncleyong 12 | * @微信 : ren168632201 13 | * @描述 : <解析指定excel表单的数据> 14 | */ 15 | public class ExcelUtil { 16 | public static Logger logger = Logger.getLogger(ExcelUtil.class); 17 | 18 | public static List loadExcel(String excelPath, String sheetName, Class clazz){ 19 | logger.info("===================开始读取sheet: " + sheetName); 20 | // 创建一个list 21 | List list = new ArrayList(); 22 | InputStream in = null; 23 | // 创建WorkBook对象 24 | try { 25 | File file = new File(excelPath); 26 | in = new FileInputStream(file); 27 | Workbook workbook = WorkbookFactory.create(in); 28 | // 获取sheet对象 29 | Sheet sheet = workbook.getSheet(sheetName); 30 | // 获取第一行 31 | Row firstRow = sheet.getRow(0); 32 | // 获取最后一列的列号 33 | int lastCellNum = firstRow.getLastCellNum(); 34 | 35 | // 表头 36 | String[] titles = new String[lastCellNum]; 37 | // 将表头放入数组 38 | for (int i = 0; i < lastCellNum; i++) { 39 | Cell cell = firstRow.getCell(i, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK); 40 | // 获取单元格的值 41 | String title = cell.getStringCellValue(); 42 | // 值保存到数组 43 | titles[i] = title; 44 | } 45 | 46 | int lastRowNum = sheet.getLastRowNum(); 47 | for (int i = 1; i <= lastRowNum ; i++) { 48 | T obj = clazz.newInstance(); 49 | Row rowData = sheet.getRow(i); 50 | if (rowData==null || rowDataIsEmpty(rowData)){ 51 | continue; 52 | } 53 | for (int j = 0; j < lastCellNum ; j++) { 54 | Cell cell = rowData.getCell(j, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK); 55 | cell.setCellType(CellType.STRING); 56 | String cellValue = cell.getStringCellValue(); 57 | String methodName = "set" + titles[j]; 58 | Method method = clazz.getMethod(methodName, String.class); 59 | // 反射调用 60 | method.invoke(obj, cellValue); 61 | } 62 | list.add(obj); 63 | } 64 | } catch (Exception e) { 65 | e.printStackTrace(); 66 | } finally { 67 | if (in!=null){ 68 | try { 69 | in.close(); 70 | } catch (IOException e) { 71 | e.printStackTrace(); 72 | } 73 | } 74 | } 75 | logger.info("===================读取sheet完成: " + sheetName); 76 | return list; 77 | } 78 | 79 | /** 80 | * 判断数据是否是空 81 | * @param 82 | * @return 83 | */ 84 | public static boolean rowDataIsEmpty(Row rowData) { 85 | int lastCellNum = rowData.getLastCellNum(); 86 | for (int i = 0; i < lastCellNum; i++) { 87 | Cell cell = rowData.getCell(i, Row.MissingCellPolicy.CREATE_NULL_AS_BLANK); 88 | cell.setCellType(CellType.STRING); 89 | String cellValue = cell.getStringCellValue(); 90 | if (cellValue!=null && cellValue.trim().length()>0){ 91 | return false; 92 | } 93 | } 94 | return true; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/utils/GlobalVariableUtil.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.utils; 2 | 3 | import com.jayway.jsonpath.Configuration; 4 | import com.jayway.jsonpath.JsonPath; 5 | import com.qzcsbj.autotest.testcase.BaseCase; 6 | import org.apache.log4j.Logger; 7 | import org.testng.Assert; 8 | 9 | import java.util.regex.Matcher; 10 | 11 | /** 12 | * @公众号 : 全栈测试笔记 13 | * @博客 : www.cnblogs.com/uncleyong 14 | * @微信 : ren168632201 15 | * @描述 : <> 16 | */ 17 | public class GlobalVariableUtil { 18 | public static Logger logger = Logger.getLogger(GlobalVariableUtil.class); 19 | 20 | /** 21 | * 解析全局变量,并更新全局变量的值 22 | * @param 23 | * @return 24 | */ 25 | public static void saveGlobalVariable(String res, String globalVariables){ 26 | if (null == res || "".equals(res) || null == globalVariables || "".equals(globalVariables)) { 27 | return; 28 | } 29 | String key,value; 30 | Object document = Configuration.defaultConfiguration().jsonProvider().parse(res); 31 | String[] globalVariablearr = globalVariables.split(";"); 32 | for (String globalVariable : globalVariablearr) { 33 | if (StringUtil.isNotNullAndEmpty(globalVariable)){ 34 | key = globalVariable.split("=")[0].trim(); 35 | value = globalVariable.split("=")[1].trim(); 36 | String value_real = JsonPath.read(document, value); 37 | BaseCase.globalVariableMap.put(key, value_real); 38 | } 39 | } 40 | } 41 | 42 | /** 43 | * 从全局map中获取全局变量并替换 44 | * @param 45 | * @return 46 | */ 47 | public static String substitutionGlobalVariable(String param){ 48 | if (!StringUtil.isNotNullAndEmpty(param)){ 49 | return ""; 50 | } 51 | Matcher matcher = BaseCase.replaceParamPattern.matcher(param); 52 | while (matcher.find()) { 53 | String replaceKey = matcher.group(1).trim(); 54 | String value; 55 | if ("".equals(replaceKey) || !BaseCase.globalVariableMap.containsKey(replaceKey)){ 56 | value = null; 57 | Assert.fail("替换失败"); 58 | } else { 59 | value = BaseCase.globalVariableMap.get(replaceKey); 60 | } 61 | param = param.replace(matcher.group(), value); 62 | } 63 | return param; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/utils/HttpRequestJsonUtil.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.utils; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import org.apache.http.HttpResponse; 5 | import org.apache.http.client.methods.HttpPost; 6 | import org.apache.http.entity.StringEntity; 7 | import org.apache.http.impl.client.CloseableHttpClient; 8 | import org.apache.http.impl.client.HttpClients; 9 | import org.apache.http.util.EntityUtils; 10 | 11 | import java.io.IOException; 12 | import java.util.Set; 13 | 14 | /** 15 | * @博客 : www.cnblogs.com/uncleyong 16 | * @微信 : ren168632201 17 | * @描述 : 18 | */ 19 | public class HttpRequestJsonUtil { 20 | 21 | // 声明为静态方法 22 | public static String postRequest(String url, JSONObject jsonObject, JSONObject headers){ 23 | String res = ""; 24 | HttpPost httpPost = new HttpPost(url); 25 | // 通过形参设置请求头 26 | Set headerkeys = headers.keySet(); 27 | for (String headerkey : headerkeys) { 28 | httpPost.addHeader(headerkey.trim(),headers.getString(headerkey).trim()); 29 | } 30 | // 发送 json 类型数据 31 | httpPost.setEntity(new StringEntity(jsonObject.toString(),"UTF-8")); 32 | 33 | CloseableHttpClient httpClient = HttpClients.createDefault(); 34 | // 发送请求 35 | HttpResponse httpResponse = null; 36 | try { 37 | httpResponse = httpClient.execute(httpPost); 38 | res = EntityUtils.toString(httpResponse.getEntity()); 39 | } catch (IOException e) { 40 | e.printStackTrace(); 41 | } finally { 42 | try { 43 | httpClient.close(); 44 | } catch (IOException e) { 45 | e.printStackTrace(); 46 | } 47 | } 48 | 49 | return res; 50 | } 51 | 52 | public static String sendRequest(String url, String requestType, JSONObject jsonObject, JSONObject headers){ 53 | String response = ""; 54 | if ("post".equalsIgnoreCase(requestType)){ 55 | response = postRequest(url, jsonObject, headers); 56 | }else { 57 | response = "error request type!!!"; 58 | } 59 | return response; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/utils/HttpRequestUtil.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.utils; 2 | 3 | import org.apache.http.HttpResponse; 4 | import org.apache.http.client.ClientProtocolException; 5 | import org.apache.http.client.HttpClient; 6 | import org.apache.http.client.entity.UrlEncodedFormEntity; 7 | import org.apache.http.client.methods.HttpGet; 8 | import org.apache.http.client.methods.HttpPost; 9 | import org.apache.http.impl.client.CloseableHttpClient; 10 | import org.apache.http.impl.client.HttpClients; 11 | import org.apache.http.message.BasicNameValuePair; 12 | import org.apache.http.util.EntityUtils; 13 | 14 | import java.io.IOException; 15 | import java.io.UnsupportedEncodingException; 16 | import java.util.ArrayList; 17 | import java.util.HashMap; 18 | import java.util.Map; 19 | import java.util.Set; 20 | 21 | /** 22 | * @博客 : www.cnblogs.com/uncleyong 23 | * @微信 : ren168632201 24 | * @描述 : 25 | */ 26 | public class HttpRequestUtil { 27 | public static String getRequest(String url, Map params){ 28 | String res = ""; 29 | boolean flag = true; 30 | Set keys = params.keySet(); 31 | for (String key : keys) { 32 | if (flag){ 33 | url += "?" + key + "=" + params.get(key); 34 | flag = false; 35 | }else { 36 | url += "&" + key + "=" + params.get(key); 37 | } 38 | } 39 | HttpGet httpGet = new HttpGet(url); 40 | HttpClient httpClient = HttpClients.createDefault(); 41 | 42 | try { 43 | HttpResponse response = httpClient.execute(httpGet); 44 | res = EntityUtils.toString(response.getEntity()); 45 | } catch (IOException e) { 46 | e.printStackTrace(); 47 | } finally { 48 | try { 49 | ((CloseableHttpClient) httpClient).close(); 50 | } catch (IOException e) { 51 | e.printStackTrace(); 52 | } 53 | } 54 | return res; 55 | } 56 | 57 | public static String postRequest(String url, Map params){ 58 | String res = ""; 59 | HttpPost httpPost = new HttpPost(url); 60 | ArrayList basicNameValuePairs = new ArrayList(); 61 | 62 | // 遍历map,放到basicNameValuePairs中 63 | Set keys = params.keySet(); 64 | for (String key : keys) { 65 | basicNameValuePairs.add(new BasicNameValuePair(key,params.get(key))); 66 | } 67 | HttpClient httpClient = HttpClients.createDefault(); 68 | try { 69 | httpPost.setEntity(new UrlEncodedFormEntity(basicNameValuePairs,"utf-8")); 70 | HttpResponse httpResponse = httpClient.execute(httpPost); 71 | res = EntityUtils.toString(httpResponse.getEntity()); 72 | } catch (Exception e) { 73 | e.printStackTrace(); 74 | } finally { 75 | try { 76 | ((CloseableHttpClient) httpClient).close(); 77 | } catch (IOException e) { 78 | e.printStackTrace(); 79 | } 80 | } 81 | return res; 82 | } 83 | 84 | public static String sendRequest(String url, String requestType, Map parameters){ 85 | String response = ""; 86 | if ("get".equalsIgnoreCase(requestType)){ 87 | response = getRequest(url, parameters); 88 | }else if ("post".equalsIgnoreCase(requestType)){ 89 | response = postRequest(url, parameters); 90 | }else { 91 | response = "error request type!!!"; 92 | } 93 | return response; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/utils/InitSqlUtil.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.utils; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.alibaba.fastjson.JSONObject; 5 | import com.qzcsbj.autotest.entity.InitSqlRes; 6 | import com.qzcsbj.autotest.entity.Sql; 7 | import org.apache.log4j.Logger; 8 | 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | import java.util.Map; 12 | import java.util.Set; 13 | 14 | /** 15 | * @公众号 : 全栈测试笔记 16 | * @博客 : www.cnblogs.com/uncleyong 17 | * @微信 : ren168632201 18 | * @描述 : <> 19 | */ 20 | public class InitSqlUtil { 21 | public static Logger logger = Logger.getLogger(InitSqlUtil.class); 22 | 23 | public static String doInitSql(String initSql) { 24 | // 定义存放sql执行结果的list【执行结果暂未使用】 25 | List initSqlResList = new ArrayList<>(); 26 | // 初始化sql解析为对象 27 | List sqls = JSONObject.parseArray(initSql, Sql.class); 28 | // 遍历获取sql,并执行 29 | for (Sql sql_ : sqls) { 30 | String sqlNo = sql_.getSqlNo(); 31 | String sql = sql_.getSql().trim(); 32 | String prefix = sql.split(" ")[0].trim().toLowerCase(); 33 | if (prefix.startsWith("select")){ 34 | logger.info("=====执行select语句:" + sql_); 35 | Map titleAndCellValue = JDBCUtil.query(sql); 36 | 37 | // 结果封装到初始化结果对象中 38 | InitSqlRes initSqlRes = new InitSqlRes(); 39 | initSqlRes.setNo(sqlNo); 40 | initSqlRes.setTitleAndCellValue(titleAndCellValue); 41 | 42 | // 添加到集合 43 | initSqlResList.add(initSqlRes); 44 | 45 | } else if (prefix.startsWith("delete")){ 46 | logger.info("=====执行delete语句:" + sql_); 47 | JDBCUtil.nonQuery(sql); 48 | } else if (prefix.startsWith("update")){ 49 | logger.info("=====执行update语句:" + sql_); 50 | JDBCUtil.nonQuery(sql); 51 | } else if (prefix.startsWith("insert")){ 52 | logger.info("=====执行insert语句:" + sql_); 53 | JDBCUtil.nonQuery(sql); 54 | } else { 55 | logger.info("=====sql语句【"+ sql_ +"】不符合规范"); 56 | } 57 | } 58 | 59 | return JSON.toJSONString(initSqlResList); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/utils/JDBCUtil.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.utils; 2 | 3 | import org.apache.log4j.Logger; 4 | 5 | import java.io.File; 6 | import java.io.FileInputStream; 7 | import java.io.IOException; 8 | import java.io.InputStream; 9 | import java.nio.file.Paths; 10 | import java.sql.*; 11 | import java.util.HashMap; 12 | import java.util.Map; 13 | import java.util.Properties; 14 | import java.util.Set; 15 | 16 | 17 | /** 18 | * @公众号 : 全栈测试笔记 19 | * @博客 : www.cnblogs.com/uncleyong 20 | * @微信 : ren168632201 21 | * @描述 : <> 22 | */ 23 | public class JDBCUtil { 24 | public static Logger logger = Logger.getLogger(JDBCUtil.class); 25 | 26 | public static Properties properties = new Properties(); 27 | static { 28 | // 解析jdbc.properties 29 | try { 30 | InputStream in = JDBCUtil.class.getClassLoader().getResourceAsStream("jdbc.properties"); 31 | properties.load(in); 32 | } catch (IOException e) { 33 | logger.info("解析发生异常。"); 34 | e.printStackTrace(); 35 | } 36 | } 37 | 38 | 39 | /** 40 | * 查询 41 | * @param 42 | * @return 43 | */ 44 | public static Map query(String sql){ 45 | HashMap stringObjectHashMap = null; 46 | try { 47 | Connection connection = getConnection(); 48 | Statement statement = connection.createStatement(); 49 | ResultSet resultSet = statement.executeQuery(sql); 50 | 51 | // 获取查询相关的信息 52 | ResultSetMetaData metaData = resultSet.getMetaData(); 53 | // 获取sql中有多少个查询字段 54 | int columnCount = metaData.getColumnCount(); 55 | // System.out.println("查询字段数为:" + columnCount); 56 | 57 | stringObjectHashMap = new HashMap(); 58 | // 从结果集获取查询数据 59 | while (resultSet.next()){ 60 | for (int i = 1; i <= columnCount; i++) { 61 | String columnLabel = metaData.getColumnLabel(i); 62 | String columnValue = resultSet.getObject(columnLabel).toString(); 63 | stringObjectHashMap.put(columnLabel, columnValue); 64 | } 65 | } 66 | 67 | logger.info("查询结果:" + stringObjectHashMap); 68 | } catch (Exception e) { 69 | e.printStackTrace(); 70 | } 71 | return stringObjectHashMap; 72 | } 73 | 74 | 75 | /** 76 | * 非查询 77 | * @param 78 | * @return 79 | */ 80 | public static void nonQuery(String sql){ 81 | try { 82 | // 1、获取连接 83 | Connection connection = getConnection(); 84 | // 2、获取statement 85 | Statement statement = connection.createStatement(); 86 | // 3、调用非查询方法 87 | int n = statement.executeUpdate(sql); 88 | if (n>0){ 89 | logger.info("操作成功数据条数:【" + n + "】"); 90 | } else { 91 | logger.info("操作成功数据条数:【0】"); 92 | } 93 | 94 | } catch (Exception e) { 95 | e.printStackTrace(); 96 | } 97 | } 98 | 99 | /** 100 | * 获取数据库连接 101 | * @param 102 | * @return 103 | */ 104 | public static Connection getConnection() throws SQLException { 105 | String url = properties.getProperty("jdbc.url"); 106 | String username = properties.getProperty("jdbc.username"); 107 | String password = properties.getProperty("jdbc.password"); 108 | Connection connection = DriverManager.getConnection(url, username, password); 109 | return connection; 110 | } 111 | } -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/utils/PropertiesUtil.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.utils; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.util.Properties; 8 | 9 | /** 10 | * @公众号 : 全栈测试笔记 11 | * @博客 : www.cnblogs.com/uncleyong 12 | * @微信 : ren168632201 13 | * @描述 : <> 14 | */ 15 | public class PropertiesUtil { 16 | public static Properties properties = new Properties(); 17 | static { 18 | try { 19 | InputStream in = PropertiesUtil.class.getClassLoader().getResourceAsStream("config.properties"); 20 | properties.load(in); 21 | } catch (IOException e) { 22 | e.printStackTrace(); 23 | } 24 | } 25 | 26 | // public static String getExcelPath(){ 27 | // return properties.getProperty("excelPath").trim(); 28 | // } 29 | 30 | // public static String[] getCaseSheetName(){ 31 | // String sheetNames = properties.getProperty("caseSheetName"); 32 | // String[] sheetArr = sheetNames.split(","); 33 | // return sheetArr; 34 | // } 35 | 36 | // public static String getCaseSheetName(){ 37 | // return properties.getProperty("caseSheetName"); 38 | // } 39 | 40 | 41 | public static String getIp(){ 42 | return properties.getProperty("project.ip"); 43 | } 44 | 45 | public static String getPort(){ 46 | return properties.getProperty("project.port").trim(); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/utils/StringUtil.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.utils; 2 | 3 | /** 4 | * @公众号 : 全栈测试笔记 5 | * @博客 : www.cnblogs.com/uncleyong 6 | * @微信 : ren168632201 7 | * @描述 : <> 8 | */ 9 | public class StringUtil { 10 | public static boolean isNotNullAndEmpty(String s){ 11 | return s!=null && s.trim().length()!=0; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/test/java/com/qzcsbj/autotest/utils/VariableUtil.java: -------------------------------------------------------------------------------- 1 | package com.qzcsbj.autotest.utils; 2 | 3 | import com.qzcsbj.autotest.entity.Variable; 4 | import org.apache.log4j.Logger; 5 | import org.testng.Assert; 6 | 7 | import java.util.*; 8 | 9 | /** 10 | * @公众号 : 全栈测试笔记 11 | * @博客 : www.cnblogs.com/uncleyong 12 | * @微信 : ren168632201 13 | * @描述 : <> 14 | */ 15 | public class VariableUtil { 16 | public static Logger logger = Logger.getLogger(VariableUtil.class); 17 | 18 | // 存放变量和值 19 | public static Map variableMap = new HashMap<>(); 20 | 21 | // 从对象列表variableList中获取变量和值,放到map中 22 | public static void loadVariablesToMap(List variableList) { 23 | for (Variable variable : variableList){ 24 | String name = variable.getName(); 25 | String value = variable.getValue(); 26 | variableMap.put(name,value); 27 | } 28 | } 29 | 30 | /** 31 | * 替换变量 32 | * @param 33 | * @return 34 | */ 35 | public static String variableSubstitution(String parameters) { 36 | Set names = variableMap.keySet(); 37 | for (String name : names) { 38 | if (parameters.contains(name)){ 39 | parameters = parameters.replace(name,variableMap.get(name)); 40 | } 41 | } 42 | return parameters; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/test/resources/config.properties: -------------------------------------------------------------------------------- 1 | project.ip = 127.0.0.1 2 | project.port = 9999 3 | -------------------------------------------------------------------------------- /src/test/resources/jdbc.properties: -------------------------------------------------------------------------------- 1 | jdbc.driver=com.mysql.jdbc.Driver 2 | jdbc.url=jdbc:mysql://192.168.117.180:3306/qzcsbj?useUnicode=true&characterEncoding=utf-8&useSSL=true 3 | jdbc.username=root 4 | jdbc.password=qzcsbj -------------------------------------------------------------------------------- /src/test/resources/log4j.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qzcsbj/apiAutoTest/19af8caa42fd6929359fba9b7d48b8fa0fd88dda/src/test/resources/log4j.properties -------------------------------------------------------------------------------- /testngXML/testng.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | --------------------------------------------------------------------------------