1.jenkins 有cookie參數要傳入apache
Run: clean test -Dcookie=$cookiecookie
2.maven接收maven
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.19.1</version> <configuration> <systemPropertyVariables> <testEnvironment>${cookie}</testEnvironment> </systemPropertyVariables> <suiteXmlFiles> <suiteXmlFile>${xmlFileName}</suiteXmlFile> </suiteXmlFiles> </configuration> </plugin>
3.testng接收ui
<suite name="AdSDK" thread-count="1"> <parameter name="cookie" value="${cookie}" /> <test name="AdSdkTest" preserve-order="true">