如何阻止CucumberRunner在控制台中打印详细信息

时间:2018-11-28 17:45:58

标签: cucumber-java

如何阻止CucumberRunner在控制台中打印详细信息?

String [] argv = new String[]{ 
     "-g"
    ,"components"
    ,"./Features"
  //,"-t","@functional,@regression"
    ,"-n","Validate_login_search_using_sku_id"
};
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();

有些东西被称为“单色”,但不确定如何在argv中添加它

1 个答案:

答案 0 :(得分:0)

您可以使用console.log(authenticationData.Password);//value gets printed var poolData = { UserPoolId :'******', // Your user pool id here ClientId : '***********', // Your client id here }; var userPool = new AmazonCognitoIdentity1.CognitoUserPool(poolData); var userData = { Username : '*******', Pool : userPool, }; var cognitoUser1 = new AmazonCognitoIdentity1.CognitoUser(userData); debugger; cognitoUser1.authenticateUser(authenticationData, {//code reaches here but then fails but the same code works fine in component will mount onSuccess: function (result) { console.log("OnSuccess"); //doesn't get printed const tokens = { accessToken: result.getAccessToken().getJwtToken(), idToken: result.getIdToken().getJwtToken(), refreshToken: result.getRefreshToken().getToken() }; cognitoUser1['tokens'] = tokens; // Save tokens for later use //resolve(cognitoUser); // Resolve user const AccessToken = new AmazonCognitoIdentity1.CognitoAccessToken({ AccessToken: tokens.accessToken }); console.log("AccessToken"); console.log(AccessToken); const IdToken = new AmazonCognitoIdentity1.CognitoIdToken({ IdToken: tokens.idToken }); console.log("IdToken"); console.log(IdToken); const RefreshToken = new AmazonCognitoIdentity1.CognitoRefreshToken({ RefreshToken: tokens.refreshToken }); }, onFailure: function(err) { console.log("Alert Failure"); } }); 避免打印摘要,而使用--plugin null_summary避免打印ANSI颜色转义序列。

发件人:

  

https://github.com/cucumber/cucumber-jvm/blob/master/core/src/main/resources/cucumber/api/cli/USAGE.txt

--monochrome