I see built-in database validation rules that can be used with webtests. My quick try to use them the way I use the other validation rules failed, I get an error "DatabaseFieldValidation Validation Object reference not set to an instance of an object. Column=TestColumn, ExpectedValue=Test, WaitTime=15, Retries=1, DatabaseServer=servername".
I could not find any document which explains them, can anyone direct me to the documentation or any idea on why I get this error
Can these be used with Webtests that test webservices

Database Validation Rules
davemord
No, I dont have any third party validation rules that I am using. I only validation rules I am using are the inbuilt Visual studio validation rules and a couple of the custom validation rules that I came up with, and the custom rules have nothing to do with database validation.
This is an interesting situation!
Christopher L
Here it is -
< xml version="1.0" encoding="utf-8" >
<TestCase Name="WebTest1" Id="51e3d301-be9b-4b62-9f82-11f6be950467" Owner="" Priority="0" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="0" WorkItemIds="" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="" RequestCallbackClass="path.RequestFilter, path.WebTesting" TestCaseCallbackClass="">
<Items>
<Comment CommentText="test for bugs" />
<Request Method="POST" Version="1.1" Url=http://path/service.asmx ThinkTime="0" Timeout="0" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8">
<Headers>
<Header Name="SOAPAction" Value=""http://schemas/path/Publish"" />
</Headers>
<ValidationRules>
<ValidationRule Classname="path.Database.DatabaseFieldValidation, path.Automation.WebTesting, Version=1.0.0.3, Culture=neutral, PublicKeyToken=49300bd32cc704f8" Level="High">
<RuleParameters>
<RuleParameter Name="Column" Value="ColumnName" />
<RuleParameter Name="ExpectedValue" Value="Test" />
<RuleParameter Name="WaitTime" Value="15" />
<RuleParameter Name="Retries" Value="0" />
<RuleParameter Name="DatabaseServer" Value="servername" />
</RuleParameters>
</ValidationRule>
</ValidationRules>
<StringHttpBody ContentType="text/xml">ZgBpAGwAZQA6AFwAXABnAGsAYQByAFwAZABhAHQAYQBcAFAAdQB0AC0ASQBuAC0AQgBhAHkAIABQAHIAbwBqAGUAYwB0AFwAUwB0AG8AcgB5ACAAQwBhAHIAZAAgAEQAZQB0AGEAaQBsAHMAXABTAFMAMAA3ADEAXABRAEEAXABOAGUAdwBCAHUAaQBsAGQAXABTAG8AYQBwACAAMQAuADEAXABVAHMAYQBnAGUAIABNAGUAcwBzAGEAZwBlAFwARwBlAG4AZQByAGkAYwBVAHMAYQBnAGUATQBlAHMAcwBhAGcAZQAuAHgAbQBsAA==</StringHttpBody>
</Request>
</Items>
</TestCase>
ACushen
Can anyone please advise on this The exception that is being thrown is
System.NullReferenceException: Object reference not set to an instance of an object.
at CompanyName.QA.Utilities.Automation.WebTesting.Database.DatabaseValidation.Validate(Object sender, ValidationEventArgs e)
at Microsoft.VisualStudio.TestTools.WebStress.WebTestInstrumentedTransaction.ProcessCompletedRequest(Boolean completedSynchronously)
Tammt
Ed Hintz
Yes, the problem is fixed, but it has nothing to do with the VS inbuilt validation rules. The validation rules that came with VS are working well.
SAD1
Muhammad Adel
You should be able to use the validation rule with the web test.
Could you post your web test (xml format)
KLJ