CredentialAttribute Constructor (String, String, String)

Initializes a new instance of the CredentialAttribute class with a user name, password and domain needed to access the test Web site.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting.Web
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Syntax

'Declaration
Public Sub New ( _
    userName As String, _
    password As String, _
    domain As String _
)
public CredentialAttribute(
    string userName,
    string password,
    string domain
)
public:
CredentialAttribute(
    String^ userName, 
    String^ password, 
    String^ domain
)
new : 
        userName:string * 
        password:string * 
        domain:string -> CredentialAttribute
public function CredentialAttribute(
    userName : String, 
    password : String, 
    domain : String
)

Parameters

  • userName
    Type: String

    The user to authenticate.

  • password
    Type: String

    The associated password for the user.

  • domain
    Type: String

    The domain of the user.

Remarks

Warning

The password is stored in plain text in source code and in the compiled assembly. Restrict access to the source code and assembly to help protect this sensitive information.

.NET Framework Security

See Also

Reference

CredentialAttribute Class

CredentialAttribute Overload

Microsoft.VisualStudio.TestTools.UnitTesting.Web Namespace

Other Resources

ASP.NET Unit Tests