Share via


LoadTestLoadProfile.CheckIfProfileCanBeModified Method

Throws an exception if the profile property is not yet ready to be modified.

Namespace:  Microsoft.VisualStudio.TestTools.LoadTesting
Assembly:  Microsoft.VisualStudio.QualityTools.LoadTestFramework (in Microsoft.VisualStudio.QualityTools.LoadTestFramework.dll)

Syntax

'Declaration
Public Sub CheckIfProfileCanBeModified ( _
    propertyName As String _
)
public void CheckIfProfileCanBeModified(
    string propertyName
)
public:
void CheckIfProfileCanBeModified(
    String^ propertyName
)
member CheckIfProfileCanBeModified : 
        propertyName:string -> unit
public function CheckIfProfileCanBeModified(
    propertyName : String
)

Parameters

  • propertyName
    Type: String

    The property name that you want to set.

Remarks

When a test method that is called by the ILoadTestPlugin modifies the LoadTestScenario.LoadProfile property (available from the LoadTest.Scenarios property), it must first assign values to the properties of the object that is extending the LoadTestLoadProfile class before it assigns that object to the LoadTestScenario.LoadProfile. The CheckIfProfileCanBeModified method is used by the built-in implementations of LoadTestLoadProfile, and can also be used by custom implementations of LoadTestLoadProfile to guarantee this ordering. For example, it can be called in the setter for a property of a custom implementation of LoadTestLoadProfile. If the setter is called by the ILoadTestPlugin out of the required order, CheckIfProfileCanBeModified throws a LoadProfileModificationException. The string that is passed as an argument is the propertyName that the caller is trying to set, and is included in the Message property of the LoadProfileModificationException if it is thrown.

.NET Framework Security

See Also

Reference

LoadTestLoadProfile Class

Microsoft.VisualStudio.TestTools.LoadTesting Namespace

ILoadTestPlugin

LoadTestScenario