Skip to content

Commit 5cc7cb2

Browse files
authored
Merge pull request #2531 from craigcaseyMSFT/vcraic0718
Content update project in test folder (41-50)
2 parents b8e2851 + ae83f63 commit 5cc7cb2

10 files changed

+86
-87
lines changed

docs/test/extending-coded-ui-tests-and-action-recordings-to-support-microsoft-excel.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.workload:
1010
- "multiple"
1111
author: gewarren
1212
---
13-
# Extend Coded UI Tests and Action Recordings
13+
# Extend coded UI tests and action recordings
1414

1515
The testing framework for coded UI tests and action recordings does not support every possible user interface. It might not support the specific UI that you want to test. For example, you cannot immediately create a coded UI test or an action recording for a Microsoft Excel spreadsheet. However, you can create your own extension to the coded UI test framework that supports your specific UI by taking advantage of the extensibility of the coded UI test framework.
1616

@@ -29,6 +29,6 @@ This [blog post](https://blogs.msdn.microsoft.com/gautamg/2010/01/05/3-introduci
2929
- <xref:Microsoft.VisualStudio.TestTools.UITest.Extension.UITechnologyElement>
3030
- <xref:Microsoft.VisualStudio.TestTools.UITest.Common.UITestActionFilter>
3131
- <xref:Microsoft.VisualStudio.TestTools.UITest.Extension.UITestExtensionPackage>
32-
- [Use UI Automation To Test Your Code](../test/use-ui-automation-to-test-your-code.md)
33-
- [Best Practices for Coded UI Tests](../test/best-practices-for-coded-ui-tests.md)
34-
- [Supported Configurations and Platforms for Coded UI Tests and Action Recordings](../test/supported-configurations-and-platforms-for-coded-ui-tests-and-action-recordings.md)
32+
- [Use UI automation to test your code](../test/use-ui-automation-to-test-your-code.md)
33+
- [Best practices for coded UI tests](../test/best-practices-for-coded-ui-tests.md)
34+
- [Supported configurations and platforms for coded UI tests and action recordings](../test/supported-configurations-and-platforms-for-coded-ui-tests-and-action-recordings.md)

docs/test/fix-non-detectable-dynamic-parameters-in-a-web-performance-test.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Some types of dynamic parameters are not detected. An undetected dynamic paramet
2929

3030
To demonstrate both a detectable and a non-detectable dynamic parameter, we’ll create a simple ASP.NET web application that has three web forms with a few controls and some custom code. We’ll then learn how to isolate the dynamic parameters and how to handle them.
3131

32-
1. Create a new ASP.NET project named DynamicParamaterSample.
32+
1. Create a new ASP.NET project named **DynamicParameterSample**.
3333

3434
![Create an empty ASP.NET web application project](../test/media/web_test_dynamicparameter_aspproject.png)
3535

36-
2. Add a web form named Querystring.aspx.
36+
2. Add a web form named *Querystring.aspx*.
3737

3838
3. In design view, drag a HiddenField onto the page and in then in change the value for the (ID) property to HiddenFieldSessionID.
3939

@@ -56,7 +56,7 @@ To demonstrate both a detectable and a non-detectable dynamic parameter, we’ll
5656
</html>
5757
```
5858

59-
5. Open the Querystring.aspx.cs file and add the following highlighted code to the Page_Load method:
59+
5. Open the *Querystring.aspx.cs* file and add the following highlighted code to the Page_Load method:
6060

6161
```csharp
6262
public partial class Querystring : System.Web.UI.Page
@@ -68,25 +68,25 @@ To demonstrate both a detectable and a non-detectable dynamic parameter, we’ll
6868
}
6969
```
7070

71-
6. Add a second web form named ASPQuery.aspx.
71+
6. Add a second web form named *ASPQuery.aspx*.
7272

73-
7. In design view, drag a Label onto the page and change the value for its (ID) property to IndexLabel.
73+
7. In design view, drag a **Label** onto the page and change the value for its **(ID)** property to **IndexLabel**.
7474

7575
![Add a label to the web form](../test/media/web_test_dynamicparameter_label.png)
7676

77-
8. Drag a HyperLink onto the page and change the vale for its Text property to Back.
77+
8. Drag a **HyperLink** onto the page and change the vale for its **Text** property to **Back**.
7878

7979
![Add a hyperlink to the web form](../test/media/web_test_dynamicparameter_hyperlink.png)
8080

81-
9. Choose (…) for the NavigationURL property.
81+
9. Choose **(…)** for the **NavigationURL** property.
8282

8383
![Edit the NavigateURL property](../test/media/web_test_dynamicparameter_hyperlink_navurl.png)
8484

85-
Select Querystring.aspx.
85+
Select *Querystring.aspx*.
8686

8787
![Choose the URL to be Querystring.aspx](../test/media/web_test_dynamicparameter_hyperlink_navurl2.png)
8888

89-
10. Open the ASPQuery.aspx.cs file, and add the following highlighted code to the Page_Load method:
89+
10. Open the *ASPQuery.aspx.cs* file, and add the following highlighted code to the Page_Load method:
9090

9191
```csharp
9292
protected void Page_Load(object sender, EventArgs e)
@@ -95,13 +95,13 @@ To demonstrate both a detectable and a non-detectable dynamic parameter, we’ll
9595
}
9696
```
9797

98-
11. Add a third web form named JScriptQuery.aspx.
98+
11. Add a third web form named *JScriptQuery.aspx*.
9999

100-
Just as we did for the second page, drag a label onto the form, setting its (ID) property to IndexLabel and drag a Hyperlink onto the form, setting its text property to Back, and its NavigationURL property to Querystring.aspx.
100+
Just as we did for the second page, drag a **Label** onto the form, setting its **(ID)** property to **IndexLabel** and drag a **Hyperlink** onto the form, setting its **Text** property to **Back**, and its **NavigationURL** property to **Querystring.aspx**.
101101

102102
![Add and configure the third web form](../test/media/web_test_dynamicparameter_addwebform3.png)
103103

104-
12. Open the JScriptQuery.aspx.cs file, and add the following highlighted code to the Page_Load method:
104+
12. Open the *JScriptQuery.aspx.cs* file, and add the following highlighted code to the Page_Load method:
105105

106106
```csharp
107107
protected void Page_Load(object sender, EventArgs e)
@@ -112,11 +112,11 @@ To demonstrate both a detectable and a non-detectable dynamic parameter, we’ll
112112

113113
13. Save the project.
114114

115-
14. In Solution Explorer, set the Querystring.aspx as the start page.
115+
14. In **Solution Explorer**, set the *Querystring.aspx* as the start page.
116116

117117
![Set the start page on Querystring.aspx](../test/media/web_test_dynamicparameter_setstartpage.png)
118118

119-
15. Press CTRL+F5 to run the web application in the browser. Copy the URL. You will need it when you record your test.
119+
15. Press **Ctrl**+**F5** to run the web application in the browser. Copy the URL. You will need it when you record your test.
120120

121121
16. Try both links. They should each display the message "Success. Dynamic querystring parameter found."
122122

@@ -146,21 +146,21 @@ To demonstrate both a detectable and a non-detectable dynamic parameter, we’ll
146146

147147
The web test recorder displays the HTTP request and response URLs as you navigate through the web app.
148148

149-
6. Choose the stop button on the test recorder.
149+
6. Choose the **Stop** button on the test recorder.
150150

151151
The dialog box for detecting dynamic parameters displays a progress bar that shows the status of parameter detection in the HTTP responses that were received.
152152

153153
7. The dynamic parameter for CustomQueryString in the ASPQuery page is automatically detected. However, The dynamic parameter for CustomQueryString in the JScriptQuery page is not detected.
154154

155-
Choose OK to add an extraction rule to Querystring.aspx, binding it to the ASPQuery page.
155+
Choose **OK** to add an extraction rule to *Querystring.aspx*, binding it to the ASPQuery page.
156156

157157
![Promote the detected dynamic parameter](../test/media/web_test_dynamicparameter_promotedialog.png)
158158

159-
The extraction rule is added to the first request for Querystring.aspx.
159+
The extraction rule is added to the first request for *Querystring.aspx*.
160160

161161
![Extraction rule added to request](../test/media/web_test_dynamicparameter_autoextractionrule.png)
162162

163-
Expand the second request in the request tree for ASPQuery.aspx and notice that the CustomQueryString's value has been bound to the extraction rule.
163+
Expand the second request in the request tree for *ASPQuery.aspx* and notice that the CustomQueryString's value has been bound to the extraction rule.
164164

165165
![CustomQueryString bound to extraction rule](../test/media/web_test_dynamicparameter_autoextractionrule2.png)
166166

@@ -172,21 +172,21 @@ To demonstrate both a detectable and a non-detectable dynamic parameter, we’ll
172172

173173
![Run the web performance test](../test/media/web_test_dynamicparameter_runtest.png)
174174

175-
2. The fourth request for the JScriptQuery.aspx page fails. Go to the web test.
175+
2. The fourth request for the *JScriptQuery.aspx* page fails. Go to the web test.
176176

177177
![Dynamic parameter error in test results](../test/media/web_test_dynamicparameter_runresults.png)
178178

179-
The JScriptQuery.aspx request node is highlighted in the editor. Expand the node and notice that the "1v0yhyiyr0raa2w4j4pwf5zl" portion of the CustomQueryString appears to be dynamic.
179+
The *JScriptQuery.aspx* request node is highlighted in the editor. Expand the node and notice that the "1v0yhyiyr0raa2w4j4pwf5zl" portion of the CustomQueryString appears to be dynamic.
180180

181181
![Suspected dynamic parameter in CustomQueryString](../test/media/web_test_dynamicparameter_runresults2.png)
182182

183-
3. Return to the Web Performance Test Results Viewer and select the JScriptQuery.aspx page that failed. Then, choose the request tab, verify that the show raw data check box is cleared, scroll down and choose quick find on the CustomQueryString.
183+
3. Return to the Web Performance Test Results Viewer and select the *JScriptQuery.aspx* page that failed. Then, choose the request tab, verify that the show raw data check box is cleared, scroll down and choose quick find on the CustomQueryString.
184184

185185
![Use quick find to isolate the dynamic paramter](../test/media/web_test_dynamicparameter_runresultsquckfind.png)
186186

187-
4. We know from looking at the test editor, that the JScriptQuery.aspx request's CustomQueryString was assigned a value of: `jScriptQueryString___1v0yhyiyr0raa2w4j4pwf5zl`, and that the suspected dynamic portion is "1v0yhyiyr0raa2w4j4pwf5zl". In the find what drop-down list, remove the suspect portion of the search string. The string should be "CustomQueryString=jScriptQueryString___".
187+
4. We know from looking at the test editor, that the *JScriptQuery.aspx* request's CustomQueryString was assigned a value of: `jScriptQueryString___1v0yhyiyr0raa2w4j4pwf5zl`, and that the suspected dynamic portion is "1v0yhyiyr0raa2w4j4pwf5zl". In the find what drop-down list, remove the suspect portion of the search string. The string should be "CustomQueryString=jScriptQueryString___".
188188

189-
Dynamic parameters are assigned their values in one of the requests that precedes the request that has the error. Therefore, select the search up check box and choose find next until you see preceding request for Querystring.aspx highlighted in the request panel. This should occur after you choose find next three times.
189+
Dynamic parameters are assigned their values in one of the requests that precedes the request that has the error. Therefore, select the search up check box and choose find next until you see preceding request for *Querystring.aspx* highlighted in the request panel. This should occur after you choose find next three times.
190190

191191
![Use quick find to isolate the dynamic parameter](../test/media/web_test_dynamicparameter_runresultsquckfind4.png)
192192

@@ -209,33 +209,33 @@ To demonstrate both a detectable and a non-detectable dynamic parameter, we’ll
209209

210210
![Choose recorded result](../test/media/web_test_dynamicparameter_recordedresult.png)
211211

212-
7. In the recorded results, select the third request, which is the same Querystringrequest.aspx request that you isolated in the test run results.
212+
7. In the recorded results, select the third request, which is the same *Querystringrequest.aspx* request that you isolated in the test run results.
213213

214214
![Choose the same request in the recorded results](../test/media/web_test_dynamicparameter_recordedresultsselectnode.png)
215215

216216
Choose the response tab, scroll down and choose the original dynamic parameter value of "1v0yhyiyr0raa2w4j4pwf5zl" that you isolated previously and add an extraction rule.
217217

218218
![Add an extraction rule for the dynamic parameter](../test/media/web_test_dynamicparameter_recordedresultaddextractionrule.png)
219219

220-
The new extraction rule is added to the Querystring.aspx request and is assigned a value of 'Param0'.
220+
The new extraction rule is added to the *Querystring.aspx* request and is assigned a value of 'Param0'.
221221

222-
If the dialog box informs us that matches were found for the extracted text to bind the parameter to, choose yes.
222+
If the dialog box informs us that matches were found for the extracted text to bind the parameter to, choose **Yes**.
223223

224224
![Extraction rule created](../test/media/web_test_dynamicparameter_addextractiondialog.png)
225225

226-
8. Choose find next. The first match is the one that we need to change, which is the parameter for CustomQueryString in for the JScriptQuery page.
226+
8. Choose **Find Next**. The first match is the one that we need to change, which is the parameter for CustomQueryString in for the JScriptQuery page.
227227

228228
![Find and replace the text for the parameter](../test/media/web_test_dynamicparameter_addextractionfindreplace.png)
229229

230-
9. Choose replace.
230+
9. Choose **Replace**.
231231

232232
![Replace the text with the parameter](../test/media/web_test_dynamicparameter_addextractionfindreplace2.png)
233233

234-
The QueryString parameter under the JScriptQuery.aspx request is updated by using the new context parameter: CustomQueryString=jScriptQueryString___{{Param0}}.
234+
The QueryString parameter under the *JScriptQuery.aspx* request is updated by using the new context parameter: CustomQueryString=jScriptQueryString___{{Param0}}.
235235

236236
![Parameter applied to querystring](../test/media/web_test_dynamicparameter_addextractionfindreplace3.png)
237237

238-
10. Close the find and replace dialog. Notice the similar structure of in the request tree between the detected dynamic parameter and the non-detected dynamic parameter that you correlated.
238+
10. Close the **Find and Replace** dialog. Notice the similar structure of in the request tree between the detected dynamic parameter and the non-detected dynamic parameter that you correlated.
239239

240240
![Detected and correlated dynamic parameters](../test/media/web_test_dynamicparameter_conclusion.png)
241241

@@ -247,13 +247,13 @@ To demonstrate both a detectable and a non-detectable dynamic parameter, we’ll
247247

248248
**A:** Yes, use the following procedure:
249249

250-
1. In the toolbar, choose the Promote Dynamic Parameters to Web Test Parameters button.
250+
1. In the toolbar, choose the **Promote Dynamic Parameters to Web Test Parameters** button.
251251

252-
After the detection process completes, if any dynamic parameters are detected, the Promote Dynamic Parameters to web test parameters dialog box appears.
252+
After the detection process completes, if any dynamic parameters are detected, the **Promote Dynamic Parameters to web test parameters** dialog box appears.
253253

254254
The dynamic parameters are listed under the Dynamic Parameters column. The requests that the dynamic parameter will be extracted from and bound to are listed under the Extract Parameter from Response and Bind to Request columns.
255255

256-
If you choose a dynamic parameter in the Promote Dynamic Parameters to web test parameters dialog box, two requests will be highlighted in the Web Performance Test Editor request tree. The first request will be the request that the extraction rule will be added to. The second request is where the extracted value will be bound.
256+
If you choose a dynamic parameter in the **Promote Dynamic Parameters to web test parameters** dialog box, two requests will be highlighted in the Web Performance Test Editor request tree. The first request will be the request that the extraction rule will be added to. The second request is where the extracted value will be bound.
257257

258258
2. Select or clear the check box next to the dynamic parameters you would like to automatically correlate. By default, all the dynamic parameters are checked.
259259

docs/test/generate-and-run-a-coded-web-performance-test.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ Web performance tests are recorded by browsing through your web app. The tests a
7979
## Q&A
8080

8181
### Q: Can I run more than one test at a time?
82-
**A:** Yes, use the context menu in Solution Explorer.
82+
**A:** Yes, use the context menu in **Solution Explorer**.
8383

8484
### Q: Should I add a data source before or after I generate a coded test?
85-
**A:** It is easier to a [data source](../test/add-a-data-source-to-a-web-performance-test.md), before you generate the coded test because the code will be automatically generated for you.
85+
**A:** It is easier to add a [data source](../test/add-a-data-source-to-a-web-performance-test.md) before you generate the coded test because the code will be automatically generated for you.
8686

8787
When you run a coded test with a data source, you might see the following error message:
8888

@@ -91,4 +91,4 @@ Web performance tests are recorded by browsing through your web app. The tests a
9191
This can occur because you have a DataSourceAttribute defined for the test class, without a corresponding DataBindingAttribute. To resolve this error, add an appropriate DataBindingAttribute, delete it, or comment it out of the code.
9292

9393
### Q: Should I add validation and extraction rules before or after I generate a coded test?
94-
**A:** It is easier to validation rules and extraction rules before you generate the coded test; however, we recommend that you use [coded UI tests](../test/use-ui-automation-to-test-your-code.md) for validation purposes.
94+
**A:** It is easier to add validation rules and extraction rules before you generate the coded test; however, we recommend that you use [coded UI tests](../test/use-ui-automation-to-test-your-code.md) for validation purposes.

0 commit comments

Comments
 (0)