Skip to content

Commit

Permalink
Created Readme.md for setting load test scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
ramon-tomas-c committed Nov 8, 2017
1 parent 5af3bb6 commit ee61c8f
Show file tree
Hide file tree
Showing 12 changed files with 93 additions and 9 deletions.
Binary file added img/loadtests/k8ssettings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/loadtests/loadtestproj_dir.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/loadtests/runloadtest.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/loadtests/sfmanifestsettings.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/Services/Catalog/Catalog.API/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"Default": "Trace",
"System": "Information",
"Microsoft": "Information"
}
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Identity/Identity.API/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"Default": "Trace",
"System": "Information",
"Microsoft": "Information"
}
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Location/Locations.API/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"Default": "Trace",
"System": "Information",
"Microsoft": "Information"
}
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Marketing/Marketing.API/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Warning"
"Default": "Trace"
}
},
"ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word",
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Ordering/Ordering.API/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"Default": "Trace",
"System": "Information",
"Microsoft": "Information"
}
Expand Down
6 changes: 3 additions & 3 deletions test/Services/LoadTest/LoadTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@
<None Include="WebMVC\AddProducts.webtest">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="WebMVC\CatalogFilter.webtest">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Identity.API\Logout.webtest">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="WebMVC\CreateNewOrder.webtest">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="WebMVC\CatalogFilter.webtest">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup />
<Choose>
Expand Down
2 changes: 1 addition & 1 deletion test/Services/LoadTest/WebMVC/CreateNewOrder.webtest
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
<FormPostParameter Name="Total" Value="8.5" RecordedValue="8.5" CorrelationBinding="" UrlEncode="True" />
<FormPostParameter Name="action" Value="[ Place Order ]" RecordedValue="[ Place Order ]" CorrelationBinding="{{FormPostParam9.action}}" UrlEncode="True" />
<FormPostParameter Name="ZipCode" Value="98052" RecordedValue="98052" CorrelationBinding="" UrlEncode="True" />
<FormPostParameter Name="RequestId" Value="{{GenGuid}} " RecordedValue="f58b9345-ea25-4125-a8bf-b0992233af6c" CorrelationBinding="" UrlEncode="True" />
<FormPostParameter Name="RequestId" Value="{{GenGuid}}" RecordedValue="{{GenGuid}}" CorrelationBinding="" UrlEncode="True" />
<FormPostParameter Name="CardTypeId" Value="1" RecordedValue="" CorrelationBinding="" UrlEncode="True" />
</FormPostHttpBody>
</Request>
Expand Down
84 changes: 84 additions & 0 deletions test/Services/LoadTest/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Load Testing settings

This folder contains files needed to run load tests locally or on a Kubernetes / Service Fabric cluster.

<p>
<img src="../../../img/loadtests/loadtestproj_dir.png">
<p>

## Set a local environment

Modify the **app.config** file and set the following service urls.

```
<Servers>
<MvcWebServer url="http://localhost:5100" />
<CatalogApiServer url="http://localhost:5101" />
<OrderingApiServer url="http://localhost:5102" />
<BasketApiServer url="http://localhost:5103" />
<IdentityApiServer url="http://localhost:5105" />
<LocationsApiServer url="http://localhost:5109" />
<MarketingApiServer url="http://localhost:5110" />
</Servers>
```

Modify the **.env** file and set the following config property as shown bellow.

```
USE_LOADTEST=True
```
## Set a Service Fabric environment

Modify the **app.config** file and set the following service urls.

```
<Servers>
<MvcWebServer url="http://<target_sf_dns>:5100" />
<CatalogApiServer url="http://<target_sf_dns>:5101" />
<OrderingApiServer url="http://<target_sf_dns>:5102" />
<BasketApiServer url="http://<target_sf_dns>:5103" />
<IdentityApiServer url="http://<target_sf_dns>:5105" />
<LocationsApiServer url="http://<target_sf_dns>:5109" />
<MarketingApiServer url="http://<target_sf_dns>:5110" />
</Servers>
```

Modify the **ServiceManifest.xml** files of the eShop SF Services and set the **UseLoadTest** environment variable to True. This setting enables the load tests to bypass authorization in api services.

<p>
<img src="../../../img/loadtests/sfmanifestsettings.png">
<p>

Deploy the SF services. **PLEASE** Read our [SF deployment guide for Linux](./../../../deploy/az/servicefabric/LinuxContainers/readme.md) And [SF deployment guide for Windows](./../../../deploy/az/servicefabric/WindowsContainers/readme.md) to know about how to deploy eshop on SF.

## Set a Kubernetes environment

Modify the **app.config** file and set the following service urls.

```
<Servers>
<MvcWebServer url="http://<target_k8s_dns>:5100" />
<CatalogApiServer url="http://<target_k8s_dns>:5101" />
<OrderingApiServer url="http://<target_k8s_dns>:5102" />
<BasketApiServer url="http://<target_k8s_dns>:5103" />
<IdentityApiServer url="http://<target_k8s_dns>:5105" />
<LocationsApiServer url="http://<target_k8s_dns>:5109" />
<MarketingApiServer url="http://<target_k8s_dns>:5110" />
</Servers>
```

Modify the **conf_local.yml** file in the K8s directory and set the **EnableLoadTest** environment variable to True. This setting enables the load tests to bypass authorization in api services.

<p>
<img src="../../../img/loadtests/k8ssettings.png">
<p>

Deploy the kubernetes services. **PLEASE** Read our [k8s deployment guide](./../../../k8s/README.k8s.md) to know about how to deploy eshop on Kubernetes.

## Run Load Tests

Open the load test you want to perform ***.loadtest** files and click the Run Load test button.

<p>
<img src="./../../../img/loadtests/runloadtest.png">
<p>

0 comments on commit ee61c8f

Please sign in to comment.