satya8967

hi,

I am new to VSTS web test. I recorded one test case through VSTS web test. The test case is for creating one account. While executing the test case it is not entering any information to the database. In a way it is not creating any account.

Is this the behaviour of VSTS or i am missing any thing

Please help.

satya




Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

Matthew Adcock

Being new to VSTS, have you checked out the links on the home page of this forum They may explain what you need to be aware of when automating transactions. Assuming you are using a Web Test, there is most likely unique data that you need to account for during each iteration of the Web Test. In the context of your example, that is creating an account, are you submitting unique values that would constitute a new account




Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

satya8967

yes. while recording i record it through one value. But before executing am changing the values of the inputs in the properties window with new values.




Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

Yutong MSFT

Are there any client-side scripts involved in generating the account If there are, they will not be recorded by the VSTS during recording and they will not be executed when you run the test from Web test editor. You can use Fiddler (www.fiddlertool.com) to capture and insert the request into the web test.

Thanks






Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

satya8967

Thanks Yutong

Now am able to add data to the database after capturing the request through fiddler. Now am facing another problem. Let me know if you can help me in this regard.

After adding the record when am searching for this am getting it in a grid. Adjacent to this grid there is a checkbox. I am checking that checkbox & trying to delete it with a menu from the top. But it is not deleting & the whole test case is getting passed. Is there any solution to this

Thanks

Satya






Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

Yutong MSFT

Was the data grid getting deleted during recording If yes, is the deletion handled by client-side code If it is handled by the client-side code, can you use Fiddler to capture it




Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

Yutong MSFT

Any feedback on this




Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

satya8967

Was able to do that... But now facing another problem. In my scenario am creating an account. It's id got autogenerated. Now am trying to update that account. But it is not reflecting the updations in the database. Have used Fiddler as well for this. Please help me out in this!!!




Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

Yutong MSFT

Q1. "Now am trying to update that account. But it is not reflecting the updations in the database."

The question is not clear to me. Does this work when you browse the sites from IE

Did this happen when you ran a web test If the answer is "Yes", does your web app support adding same account twice

Again, if this is related to client-side script and cannot be captured by VSTS, use Fiddler. If it still cannot be handled, you may want to simulate the logic in coded web test. Please read http://msdn2.microsoft.com/en-us/library/ms364082(VS.80).aspx, section Going Further with Coded web tests.






Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

satya8967

Q1. "Now am trying to update that account. But it is not reflecting the updations in the database."

Means I have created an account by running the script. Now for example am updating address field from value add1 to add2. Now if am saving the updation it is not showing any error on VSTS web test but the updation is not getting saved on database. So, if am opening that account details the address field remains as add1.

Yes, when I created a webtest it is updating in the database & yes, my app supports this as this is only updation. Here am not creating anything, am just updating one field.

To generated the script I have used Fiddler as well. That also not solving the issue.

As far as my understanding is concerned, VSTS sends request with inputs through Form Post Parameters. Does it actually update that particular field or it tries to update everything including ID as well which is a autogenerated field. Because when I record the Form Post Parameter captures everything including the autogenerated fields. I have also tried with removing those lines from Form Post Parameter, but with no benefit. Do suggest if you have any solution

Thanks






Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

Yutong MSFT

First, I still need the answers to the questions in my previous post

Q1. During recording, i.e. when you browse your web site using IE, can you update an existing accout successfully

Q2. Is "Updating account" handled by client-side script on your web page

Second, You web application is responsible for updating your database. The web test engine in VSTS works at the HTTP layer. It sends http requests to your web sever.If the "Updating account" action is handled by the client-side script, and if the action cannot be recorded as a request in the VSTS web test, when you run the web test from the web test editor, the accout will not get updated.






Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

satya8967

Hi,

I got the solution. Thank you very much for all the help.

Well, I have many queries. If u don't mind I would like to share it with you...

1. Have u any idea about VSTS code-coverage & how to incorporate it with automation

2. Any validation rule to get the enable or disable property of any text

Thanks






Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

satya8967

Hi,

I got the solution. Thank you very much for all the help.

Well, I have many queries. If u don't mind I would like to share it with you...

1. Have u any idea about VSTS code-coverage & how to incorporate it with automation

2. Any validation rule to get the enable or disable property of any text

3. How make web server name to anything at one go for the whole project containing 10 test cases.

Thanks






Re: Visual Studio Team System - Web and Load Testing Data not getting updated in the Database while testing through webtest

Yutong MSFT

A1. For code coverage questions, please post it to http://forums.microsoft.com/msdn/showforum.aspx forumid=19&siteid=1.

A2. A validation rule is used to validate fields in the response page. If the response is parsed correctly and if the field exists, you should be able to get the data you expect and validate it.

A3. First, parameterize the web server in your web tests (the option is on the toolbar of the web test editor). Then set an environment variable. For details, please read http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=152536&SiteID=1.

Thanks.