-
-
Notifications
You must be signed in to change notification settings - Fork 6
Hide or Remove test cases parameters in report
Alexandr D edited this page Oct 5, 2018
·
7 revisions
It is not always appropriate to show the value of all parameters in the report (for example, passwords)
So you can use the attribute [AllureHideParam]
relative to the test method, which takes as input the parameter numbers separated by commas, which should be hidden.
Example:
[AllureHideParams(2)]
public void LoginToApp(string login, string password)
{
Pages.GetPage<AuthorizationPage>().LoginToApp(login, password);
}
In this case, password parameter will be hidden in the report: You can specify a comma which parameters should be hidden, starting from one.
Example:
[AllureHideParams(1, 2)]
public void LoginToApp(string login, string password)
{
Pages.GetPage<AuthorizationPage>().LoginToApp(login, password);
}
In this case, login and password parameters will be hidden in the report:
If you want to delete parameter(s), use the attribute [AllureRemoveParams]
, as well as [AllureHideParam]
.
Example:
[AllureRemoveParams(2)]
public void LoginToApp(string login, string password)
{
Pages.GetPage<AuthorizationPage>().LoginToApp(login, password);
}
In this case, the password parameter will not be displayed in the report.