TutorialTests.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:Rapture 作者:
/**
 * Setup TestNG method to create Rapture login object and objects.
 *
 * @param RaptureURL Passed in from <env>_testng.xml suite file
 * @param RaptureUser Passed in from <env>_testng.xml suite file
 * @param RapturePassword Passed in from <env>_testng.xml suite file
 *
 * @return none
 */
@BeforeClass(groups={"document"})
@Parameters({"RaptureURL","RaptureUser","RapturePassword"})
public void setUp(@Optional("http://localhost:8665/rapture")String url,
                  @Optional("rapture")String username, @Optional("rapture")String password ) {

    ///If running from eclipse set environment variable -Penv=docker 
    //or use the following:
    //  url="http://localhost:8665/rapture";
    //  url="http://192.168.99.101:8665/rapture"; //docker

    Reporter.log("Using URL: " + url,true);
    raptureLogin = new HttpLoginApi(url, new SimpleCredentialsProvider(username, password));
    try{
        raptureLogin.login();
        document = new HttpDocApi(raptureLogin);
    } catch (RaptureException re) {
        Reporter.log(re.getFormattedMessage(),true);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号