Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
study
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Li Yongyu
study
Commits
517d2040
Commit
517d2040
authored
Mar 07, 2019
by
Li Yongyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
67b2c280
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
110 additions
and
108 deletions
+110
-108
DataAll.xls
studycenter_Api_auto_test/TestData/DataAll.xls
+0
-0
build.xml
studycenter_Api_auto_test/build.xml
+85
-85
DefectTest.xml
studycenter_Api_auto_test/src/DefectTest.xml
+1
-1
Mail.java
studycenter_Api_auto_test/src/com/offcn/TestUnti/Mail.java
+0
-0
ZipUtils.java
...center_Api_auto_test/src/com/offcn/TestUnti/ZipUtils.java
+0
-0
moment.java
...pi_auto_test/src/com/offcn/api/study/studyapi/moment.java
+2
-0
testng.xml
studycenter_Api_auto_test/testng.xml
+22
-22
No files found.
studycenter_Api_auto_test/TestData/DataAll.xls
View file @
517d2040
No preview for this file type
studycenter_Api_auto_test/build.xml
View file @
517d2040
<project
name=
"auto_test"
default=
"testoutput"
basedir=
"."
>
<!-- Define <testng> task -->
<taskdef
name=
"testng"
classname=
"org.testng.TestNGAntTask"
>
<classpath>
<pathelement
location=
"lib/testng-6.8.6.jar"
/>
</classpath>
</taskdef>
<property
name=
"testoutputdir"
location=
"test-output"
/>
<property
name=
"srcdir"
location=
"src"
/>
<property
name=
"libdir"
location=
"lib"
/>
<property
name=
"full-compile"
value=
"true"
/>
<property
name=
"basedir"
value=
"
D:/workspace/auto_test/"
/>
<path
id=
"classpath.test"
>
<fileset
dir=
"${libdir}"
>
<include
name=
"**/*.jar"
/>
</fileset>
<pathelement
location=
"${testoutputdir}"
/>
<pathelement
location=
"${srcdir}"
/>
</path>
<target
name=
"clean"
>
<delete
dir=
"${basedir}/bin"
/>
</target>
<target
name=
"compile"
depends=
"clean"
>
<mkdir
dir=
"${basedir}/bin"
/>
<javac
srcdir=
"${srcdir}"
encoding=
"UTF-8"
destdir=
"${basedir}/bin"
verbose=
"${full-compile}"
classpathref=
"classpath.test"
includeantruntime=
"off"
debug=
"on"
debuglevel=
"lines,vars,source"
/>
</target>
<path
id=
"classes"
>
<fileset
dir=
"${libdir}"
includes=
"*jar"
/>
<fileset
dir=
"${libdir}"
includes=
"*zip"
/>
<pathelement
location=
"${basedir}/bin/"
/>
</path>
<!--如果testng里面没有配置reportng监听器,则使用这个方式,如果testng里面配置了 reportng监听器,那么就使用这个配置
<target name="runtest" depends="compile">
<testng outputdir="${testoutputdir}" classpathref="classes"
useDefaultListeners="false"
delegateCommandSystemProperties="true" haltOnFailure="true"
listeners="org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter,org.testng.reporters.FailedReporter">
<sysproperty key="file.encoding" value="UTF-8" />
<xmlfileset dir="${basedir}" includes="testng.xml" />
</testng>
</target>-->
<!--如果testng里面配置了 reportng监听器,那么就使用这个配置-->
<target
name=
"runtest"
depends=
"compile"
>
<!---->
<testng
outputdir=
"${testoutputdir}"
classpathref=
"classes"
useDefaultListeners=
"false"
>
<sysproperty
key=
"file.encoding"
value=
"UTF-8"
/>
<xmlfileset
dir=
"${basedir}"
includes=
"testng.xml"
/>
</testng>
</target>
<target
name=
"testoutput"
depends=
"runtest"
>
<java
classname=
"com.offcn.TestUnti.Mail"
classpath=
"${basedir}/bin"
>
<sysproperty
key=
"file.encoding"
value=
"UTF-8"
/>
<classpath>
<pathelement
location=
"lib/javax.mail.jar"
/>
</classpath>
</java>
<!--
ui自动化测试报告部分
<xslt in="${testoutputdir}/testng-results.xml" style="${testoutputdir}/testng-results.xsl" out="${testoutputdir}/index.html ">
<param name="testNgXslt.outputDir" expression="${basedir}/testoutput/" />
<classpath refid="classpath.test" />
</xslt>
-->
</target>
</project>
<project
name=
"auto_test"
default=
"testoutput"
basedir=
"."
>
<!-- Define <testng> task -->
<taskdef
name=
"testng"
classname=
"org.testng.TestNGAntTask"
>
<classpath>
<pathelement
location=
"lib/testng-6.8.6.jar"
/>
</classpath>
</taskdef>
<property
name=
"testoutputdir"
location=
"test-output"
/>
<property
name=
"srcdir"
location=
"src"
/>
<property
name=
"libdir"
location=
"lib"
/>
<property
name=
"full-compile"
value=
"true"
/>
<property
name=
"basedir"
value=
"
E:\git\study\studycenter_Api_auto_test"
/>
<path
id=
"classpath.test"
>
<fileset
dir=
"${libdir}"
>
<include
name=
"**/*.jar"
/>
</fileset>
<pathelement
location=
"${testoutputdir}"
/>
<pathelement
location=
"${srcdir}"
/>
</path>
<target
name=
"clean"
>
<delete
dir=
"${basedir}/bin"
/>
</target>
<target
name=
"compile"
depends=
"clean"
>
<mkdir
dir=
"${basedir}/bin"
/>
<javac
srcdir=
"${srcdir}"
encoding=
"UTF-8"
destdir=
"${basedir}/bin"
verbose=
"${full-compile}"
classpathref=
"classpath.test"
includeantruntime=
"off"
debug=
"on"
debuglevel=
"lines,vars,source"
/>
</target>
<path
id=
"classes"
>
<fileset
dir=
"${libdir}"
includes=
"*jar"
/>
<fileset
dir=
"${libdir}"
includes=
"*zip"
/>
<pathelement
location=
"${basedir}/bin/"
/>
</path>
<!--如果testng里面没有配置reportng监听器,则使用这个方式,如果testng里面配置了 reportng监听器,那么就使用这个配置
<target name="runtest" depends="compile">
<testng outputdir="${testoutputdir}" classpathref="classes"
useDefaultListeners="false"
delegateCommandSystemProperties="true" haltOnFailure="true"
listeners="org.uncommons.reportng.HTMLReporter,org.uncommons.reportng.JUnitXMLReporter,org.testng.reporters.FailedReporter">
<sysproperty key="file.encoding" value="UTF-8" />
<xmlfileset dir="${basedir}" includes="testng.xml" />
</testng>
</target>-->
<!--如果testng里面配置了 reportng监听器,那么就使用这个配置-->
<target
name=
"runtest"
depends=
"compile"
>
<!---->
<testng
outputdir=
"${testoutputdir}"
classpathref=
"classes"
useDefaultListeners=
"false"
>
<sysproperty
key=
"file.encoding"
value=
"UTF-8"
/>
<xmlfileset
dir=
"${basedir}"
includes=
"testng.xml"
/>
</testng>
</target>
<target
name=
"testoutput"
depends=
"runtest"
>
<java
classname=
"com.offcn.TestUnti.Mail"
classpath=
"${basedir}/bin"
>
<sysproperty
key=
"file.encoding"
value=
"UTF-8"
/>
<classpath>
<pathelement
location=
"lib/javax.mail.jar"
/>
</classpath>
</java>
<!--
ui自动化测试报告部分
<xslt in="${testoutputdir}/testng-results.xml" style="${testoutputdir}/testng-results.xsl" out="${testoutputdir}/index.html ">
<param name="testNgXslt.outputDir" expression="${basedir}/testoutput/" />
<classpath refid="classpath.test" />
</xslt>
-->
</target>
</project>
studycenter_Api_auto_test/src/DefectTest.xml
View file @
517d2040
...
...
@@ -6,7 +6,7 @@
<classes>
<class
name=
"com.puhui.test.RenMai_APITest"
>
<methods>
<include
name=
"f"
invocation-numbers=
"
1 2
"
/>
<include
name=
"f"
invocation-numbers=
""
/>
</methods>
</class>
</classes>
...
...
studycenter_Api_auto_test/src/com/offcn/TestUnti/Mail.java
View file @
517d2040
This diff is collapsed.
Click to expand it.
studycenter_Api_auto_test/src/com/offcn/TestUnti/ZipUtils.java
View file @
517d2040
This diff is collapsed.
Click to expand it.
studycenter_Api_auto_test/src/com/offcn/api/study/studyapi/moment.java
View file @
517d2040
...
...
@@ -68,6 +68,7 @@ public class moment extends STUDY implements API {
@Override
public
Response
SendRequest
(
HashMap
<
String
,
Object
>
data
,
String
Url
,
String
Request
)
{
//form 格式参数
/* Map<String,String> m=new HashMap<String,String>();
m.put("user_id", user_id);
m.put("image", user_id);
...
...
@@ -95,6 +96,7 @@ public class moment extends STUDY implements API {
MyRequest
myRequest
=
new
MyRequest
();
myRequest
.
setParameter
(
parameter
);
myRequest
.
setUrl
(
Url
);
System
.
out
.
println
(
"Url===="
+
Url
);
myRequest
.
setRequest
(
Request
);
myRequest
.
setHeaders
(
ticket
);
...
...
studycenter_Api_auto_test/testng.xml
View file @
517d2040
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite
name=
"Suite"
parallel=
"none"
>
<listeners>
<listener
class-name=
"org.uncommons.reportng.HTMLReporter"
/>
<listener
class-name=
"org.uncommons.reportng.JUnitXMLReporter"
/>
</listeners>
<!-- -->
<test
name=
"Test"
>
<classes>
<class
name=
"com.offcn.test.APITest_
nwn"
/>
</classes>
</test>
<!--
<test name="Test1">
<classes>
<class name="com.offcn.TestUnti.Mail"/>
</classes>
</test> Test -->
</suite>
<!-- Suite -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite
name=
"Suite"
parallel=
"none"
>
<listeners>
<listener
class-name=
"org.uncommons.reportng.HTMLReporter"
/>
<listener
class-name=
"org.uncommons.reportng.JUnitXMLReporter"
/>
</listeners>
<!-- -->
<test
name=
"Test"
>
<classes>
<class
name=
"com.offcn.test.APITest_
study"
/>
</classes>
</test>
<!--
<test name="Test1">
<classes>
<class name="com.offcn.TestUnti.Mail"/>
</classes>
</test> Test -->
</suite>
<!-- Suite -->
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment