From 6a0001b9c6cf7ca5f88f132e84bb7d5a7f67d8e2 Mon Sep 17 00:00:00 2001 From: Christian Arenas Date: Wed, 28 Jun 2017 17:59:59 +0200 Subject: [PATCH 1/8] Add new LoadTest project, add new Catalog integration test and add new webMVC load test --- Local.testsettings | 13 + eShopOnContainers-ServicesAndWebApps.sln | 54 ++- .../Services/Catalog/CatalogScenarioBase.cs | 36 +- .../Services/Catalog/CatalogScenarios.cs | 83 +++- .../Services/Ordering/OrderingScenarios.cs | 2 +- test/Services/LoadTest/LoadTest.csproj | 114 ++++++ .../LoadTest/Properties/AssemblyInfo.cs | 35 ++ .../LoadTest/WebMVC/AddProducts.webtest | 59 +++ .../WebMVC/AddProductsWithLogin.webtest | 174 +++++++++ .../LoadTest/WebMVC/CatalogFilter.webtest | 248 ++++++++++++ .../LoadTest/WebMVC/CreateNewOrder.webtest | 353 ++++++++++++++++++ test/Services/LoadTest/WebMVC/Login.webtest | 103 +++++ .../LoadTest/WebMVC/LoginAndLogout.webtest | 123 ++++++ test/Services/LoadTest/WebMVC/Logout.webtest | 28 ++ test/Services/LoadTest/app.config | 3 + 15 files changed, 1415 insertions(+), 13 deletions(-) create mode 100644 Local.testsettings create mode 100644 test/Services/LoadTest/LoadTest.csproj create mode 100644 test/Services/LoadTest/Properties/AssemblyInfo.cs create mode 100644 test/Services/LoadTest/WebMVC/AddProducts.webtest create mode 100644 test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest create mode 100644 test/Services/LoadTest/WebMVC/CatalogFilter.webtest create mode 100644 test/Services/LoadTest/WebMVC/CreateNewOrder.webtest create mode 100644 test/Services/LoadTest/WebMVC/Login.webtest create mode 100644 test/Services/LoadTest/WebMVC/LoginAndLogout.webtest create mode 100644 test/Services/LoadTest/WebMVC/Logout.webtest create mode 100644 test/Services/LoadTest/app.config diff --git a/Local.testsettings b/Local.testsettings new file mode 100644 index 000000000..4e1e6ab7f --- /dev/null +++ b/Local.testsettings @@ -0,0 +1,13 @@ + + + These are default test settings for a local test run. + + + + + + + + + + \ No newline at end of file diff --git a/eShopOnContainers-ServicesAndWebApps.sln b/eShopOnContainers-ServicesAndWebApps.sln index 0a36c0c57..adc49e687 100644 --- a/eShopOnContainers-ServicesAndWebApps.sln +++ b/eShopOnContainers-ServicesAndWebApps.sln @@ -1,12 +1,13 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.12 +VisualStudioVersion = 15.0.26430.14 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F6-4D07-B109-DA28AD288A63}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AF739CD-81D8-428D-A08A-0A58372DEBF6}" ProjectSection(SolutionItems) = preProject + Local.testsettings = Local.testsettings NuGet.config = NuGet.config EndProjectSection EndProject @@ -96,6 +97,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Marketing", "Marketing", "{ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Marketing.API", "src\Services\Marketing\Marketing.API\Marketing.API.csproj", "{DF395F85-B010-465D-857A-7EBCC512C0C2}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadTest", "test\Services\LoadTest\LoadTest.csproj", "{969E793C-C413-490E-9C9D-B2B46DA5AF32}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Ad-Hoc|Any CPU = Ad-Hoc|Any CPU @@ -1262,6 +1265,54 @@ Global {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|x64.Build.0 = Release|Any CPU {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|x86.ActiveCfg = Release|Any CPU {DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|x86.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|ARM.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|x64.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|x86.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|Any CPU.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|ARM.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|ARM.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|iPhone.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|x64.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|x64.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|x86.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|x86.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|Any CPU.Build.0 = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|ARM.ActiveCfg = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|ARM.Build.0 = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|iPhone.Build.0 = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|x64.ActiveCfg = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|x64.Build.0 = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|x86.ActiveCfg = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|x86.Build.0 = Debug|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|Any CPU.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|Any CPU.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|ARM.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|ARM.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|iPhone.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|iPhone.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x64.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x64.Build.0 = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x86.ActiveCfg = Release|Any CPU + {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1308,5 +1359,6 @@ Global {23A33F9B-7672-426D-ACF9-FF8436ADC81A} = {88B22DBB-AA8F-4290-A454-2C109352C345} {A5260DE0-1FDD-467E-9CC1-A028AB081CEE} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} {DF395F85-B010-465D-857A-7EBCC512C0C2} = {A5260DE0-1FDD-467E-9CC1-A028AB081CEE} + {969E793C-C413-490E-9C9D-B2B46DA5AF32} = {EF0337F2-ED00-4643-89FD-EE10863F1870} EndGlobalSection EndGlobal diff --git a/test/Services/IntegrationTests/Services/Catalog/CatalogScenarioBase.cs b/test/Services/IntegrationTests/Services/Catalog/CatalogScenarioBase.cs index e70e4f8cf..ba6c225bf 100644 --- a/test/Services/IntegrationTests/Services/Catalog/CatalogScenarioBase.cs +++ b/test/Services/IntegrationTests/Services/Catalog/CatalogScenarioBase.cs @@ -1,6 +1,4 @@ - - -namespace IntegrationTests.Services.Catalog +namespace IntegrationTests.Services.Catalog { using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.TestHost; @@ -20,20 +18,42 @@ namespace IntegrationTests.Services.Catalog public static class Get { - public static string Items = "api/v1/catalog/items"; + private const int PageIndex = 0; + private const int PageCount = 4; + + public static string Items(bool paginated = false) + { + return paginated + ? "api/v1/catalog/items" + Paginated(PageIndex, PageCount) + : "api/v1/catalog/items"; + } + + public static string ItemById(int id) + { + return $"api/v1/catalog/items/{id}"; + } + + public static string ItemByName(string name, bool paginated = false) + { + return paginated + ? $"api/v1/catalog/items/withname/{name}" + Paginated(PageIndex, PageCount) + : $"api/v1/catalog/items/withname/{name}"; + } public static string Types = "api/v1/catalog/catalogtypes"; public static string Brands = "api/v1/catalog/catalogbrands"; - public static string Paginated(int pageIndex, int pageCount) + public static string Filtered(int catalogTypeId, int catalogBrandId, bool paginated = false) { - return $"api/v1/catalog/items?pageIndex={pageIndex}&pageSize={pageCount}"; + return paginated + ? $"api/v1/catalog/items/type/{catalogTypeId}/brand/{catalogBrandId}" + Paginated(PageIndex, PageCount) + : $"api/v1/catalog/items/type/{catalogTypeId}/brand/{catalogBrandId}"; } - public static string Filtered(int catalogTypeId, int catalogBrandId) + private static string Paginated(int pageIndex, int pageCount) { - return $"api/v1/catalog/items/type/{catalogTypeId}/brand/{catalogBrandId}"; + return $"?pageIndex={pageIndex}&pageSize={pageCount}"; } } } diff --git a/test/Services/IntegrationTests/Services/Catalog/CatalogScenarios.cs b/test/Services/IntegrationTests/Services/Catalog/CatalogScenarios.cs index 28a2931f2..4f55933b3 100644 --- a/test/Services/IntegrationTests/Services/Catalog/CatalogScenarios.cs +++ b/test/Services/IntegrationTests/Services/Catalog/CatalogScenarios.cs @@ -1,4 +1,6 @@ -namespace IntegrationTests.Services.Catalog +using System; + +namespace IntegrationTests.Services.Catalog { using System.Threading.Tasks; using Xunit; @@ -12,7 +14,68 @@ using (var server = CreateServer()) { var response = await server.CreateClient() - .GetAsync(Get.Items); + .GetAsync(Get.Items()); + + response.EnsureSuccessStatusCode(); + } + } + + [Fact] + public async Task Get_get_catalogitem_by_id_and_response_ok_status_code() + { + using (var server = CreateServer()) + { + var response = await server.CreateClient() + .GetAsync(Get.ItemById(1)); + + response.EnsureSuccessStatusCode(); + } + } + + [Fact] + public async Task Get_get_catalogitem_by_id_and_response_bad_request_status_code() + { + using (var server = CreateServer()) + { + var response = await server.CreateClient() + .GetAsync(Get.ItemById(int.MinValue)); + + response.EnsureSuccessStatusCode(); + } + } + + [Fact] + public async Task Get_get_catalogitem_by_id_and_response_not_found_status_code() + { + using (var server = CreateServer()) + { + var response = await server.CreateClient() + .GetAsync(Get.ItemById(int.MaxValue)); + + response.EnsureSuccessStatusCode(); + } + } + + [Fact] + public async Task Get_get_catalogitem_by_name_and_response_ok_status_code() + { + using (var server = CreateServer()) + { + var response = await server.CreateClient() + .GetAsync(Get.ItemByName(".NET")); + + response.EnsureSuccessStatusCode(); + } + } + + [Fact] + public async Task Get_get_paginated_catalogitem_by_name_and_response_ok_status_code() + { + using (var server = CreateServer()) + { + const bool paginated = true; + var response = await server.CreateClient() + .GetAsync(Get.ItemByName(".NET", paginated)); response.EnsureSuccessStatusCode(); } @@ -23,8 +86,9 @@ { using (var server = CreateServer()) { + const bool paginated = true; var response = await server.CreateClient() - .GetAsync(Get.Paginated(0, 4)); + .GetAsync(Get.Items(paginated)); response.EnsureSuccessStatusCode(); } @@ -42,6 +106,19 @@ } } + [Fact] + public async Task Get_get_paginated_filtered_catalog_items_and_response_ok_status_code() + { + using (var server = CreateServer()) + { + const bool paginated = true; + var response = await server.CreateClient() + .GetAsync(Get.Filtered(1, 1, paginated)); + + response.EnsureSuccessStatusCode(); + } + } + [Fact] public async Task Get_catalog_types_response_ok_status_code() { diff --git a/test/Services/IntegrationTests/Services/Ordering/OrderingScenarios.cs b/test/Services/IntegrationTests/Services/Ordering/OrderingScenarios.cs index d1381a92f..1e61da289 100644 --- a/test/Services/IntegrationTests/Services/Ordering/OrderingScenarios.cs +++ b/test/Services/IntegrationTests/Services/Ordering/OrderingScenarios.cs @@ -33,7 +33,7 @@ var response = await server.CreateIdempotentClient() .PutAsync(Put.CancelOrder, content); - Assert.Equal(response.StatusCode, HttpStatusCode.InternalServerError); + Assert.Equal(response.StatusCode, HttpStatusCode.BadRequest); } } diff --git a/test/Services/LoadTest/LoadTest.csproj b/test/Services/LoadTest/LoadTest.csproj new file mode 100644 index 000000000..65ba7779a --- /dev/null +++ b/test/Services/LoadTest/LoadTest.csproj @@ -0,0 +1,114 @@ + + + Debug + AnyCPU + + + 2.0 + {969E793C-C413-490E-9C9D-B2B46DA5AF32} + Library + Properties + LoadTest + LoadTest + v4.5.2 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + WebTest + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages + False + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + + + + + + + + + False + + + + + + + + + Always + + + PreserveNewest + + + PreserveNewest + + + Always + + + Always + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + + + + + False + + + False + + + False + + + False + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Properties/AssemblyInfo.cs b/test/Services/LoadTest/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..91e6827da --- /dev/null +++ b/test/Services/LoadTest/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LoadTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("LoadTest")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("969e793c-c413-490e-9c9d-b2b46da5af32")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/test/Services/LoadTest/WebMVC/AddProducts.webtest b/test/Services/LoadTest/WebMVC/AddProducts.webtest new file mode 100644 index 000000000..9984ed55e --- /dev/null +++ b/test/Services/LoadTest/WebMVC/AddProducts.webtest @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest b/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest new file mode 100644 index 000000000..1f60026a7 --- /dev/null +++ b/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest @@ -0,0 +1,174 @@ + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/WebMVC/CatalogFilter.webtest b/test/Services/LoadTest/WebMVC/CatalogFilter.webtest new file mode 100644 index 000000000..2cbbfbda8 --- /dev/null +++ b/test/Services/LoadTest/WebMVC/CatalogFilter.webtest @@ -0,0 +1,248 @@ + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest b/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest new file mode 100644 index 000000000..e14a30f62 --- /dev/null +++ b/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest @@ -0,0 +1,353 @@ + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/WebMVC/Login.webtest b/test/Services/LoadTest/WebMVC/Login.webtest new file mode 100644 index 000000000..17e02a408 --- /dev/null +++ b/test/Services/LoadTest/WebMVC/Login.webtest @@ -0,0 +1,103 @@ + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest b/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest new file mode 100644 index 000000000..ffb94543d --- /dev/null +++ b/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest @@ -0,0 +1,123 @@ + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/WebMVC/Logout.webtest b/test/Services/LoadTest/WebMVC/Logout.webtest new file mode 100644 index 000000000..b8ca3e0a7 --- /dev/null +++ b/test/Services/LoadTest/WebMVC/Logout.webtest @@ -0,0 +1,28 @@ + + + + + + + +
+ + + + +
+ + + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/app.config b/test/Services/LoadTest/app.config new file mode 100644 index 000000000..99ddf3e08 --- /dev/null +++ b/test/Services/LoadTest/app.config @@ -0,0 +1,3 @@ + + + \ No newline at end of file From ddcb665bcd8d33fa398ccd737f437c4fc590502b Mon Sep 17 00:00:00 2001 From: Christian Arenas Date: Wed, 28 Jun 2017 18:06:16 +0200 Subject: [PATCH 2/8] Edit the test assert --- .../IntegrationTests/Services/Catalog/CatalogScenarios.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/Services/IntegrationTests/Services/Catalog/CatalogScenarios.cs b/test/Services/IntegrationTests/Services/Catalog/CatalogScenarios.cs index 4f55933b3..493665cde 100644 --- a/test/Services/IntegrationTests/Services/Catalog/CatalogScenarios.cs +++ b/test/Services/IntegrationTests/Services/Catalog/CatalogScenarios.cs @@ -1,4 +1,5 @@ using System; +using System.Net; namespace IntegrationTests.Services.Catalog { @@ -40,7 +41,7 @@ namespace IntegrationTests.Services.Catalog var response = await server.CreateClient() .GetAsync(Get.ItemById(int.MinValue)); - response.EnsureSuccessStatusCode(); + Assert.Equal(response.StatusCode, HttpStatusCode.BadRequest); } } @@ -52,7 +53,7 @@ namespace IntegrationTests.Services.Catalog var response = await server.CreateClient() .GetAsync(Get.ItemById(int.MaxValue)); - response.EnsureSuccessStatusCode(); + Assert.Equal(response.StatusCode, HttpStatusCode.NotFound); } } From aa813b7f8c2824c50d415cd6f7f16f6071dbea07 Mon Sep 17 00:00:00 2001 From: Christian Arenas Date: Wed, 28 Jun 2017 19:09:29 +0200 Subject: [PATCH 3/8] Add CatalogApi load test --- .../Catalog.API/GetCatalogBrands.webtest | 18 +++ .../Catalog.API/GetCatalogFiltered.webtest | 20 +++ .../Catalog.API/GetCatalogTypes.webtest | 18 +++ .../LoadTest/Catalog.API/GetItem.webtest | 19 +++ .../LoadTest/Catalog.API/GetItemPic.webtest | 19 +++ .../LoadTest/Catalog.API/GetItems.webtest | 18 +++ .../Catalog.API/GetItemsByName.webtest | 19 +++ test/Services/LoadTest/GetItemCoded.cs | 45 +++++++ test/Services/LoadTest/LoadTest.csproj | 27 +++- .../LoadTest/WebMVC/AddProducts.webtest | 16 +-- .../WebMVC/AddProductsWithLogin.webtest | 58 ++------- .../LoadTest/WebMVC/CatalogFilter.webtest | 94 ++------------ .../LoadTest/WebMVC/CreateNewOrder.webtest | 118 +++--------------- test/Services/LoadTest/WebMVC/Login.webtest | 30 +---- .../LoadTest/WebMVC/LoginAndLogout.webtest | 46 +------ test/Services/LoadTest/WebMVC/Logout.webtest | 16 +-- 16 files changed, 252 insertions(+), 329 deletions(-) create mode 100644 test/Services/LoadTest/Catalog.API/GetCatalogBrands.webtest create mode 100644 test/Services/LoadTest/Catalog.API/GetCatalogFiltered.webtest create mode 100644 test/Services/LoadTest/Catalog.API/GetCatalogTypes.webtest create mode 100644 test/Services/LoadTest/Catalog.API/GetItem.webtest create mode 100644 test/Services/LoadTest/Catalog.API/GetItemPic.webtest create mode 100644 test/Services/LoadTest/Catalog.API/GetItems.webtest create mode 100644 test/Services/LoadTest/Catalog.API/GetItemsByName.webtest create mode 100644 test/Services/LoadTest/GetItemCoded.cs diff --git a/test/Services/LoadTest/Catalog.API/GetCatalogBrands.webtest b/test/Services/LoadTest/Catalog.API/GetCatalogBrands.webtest new file mode 100644 index 000000000..457d7fec5 --- /dev/null +++ b/test/Services/LoadTest/Catalog.API/GetCatalogBrands.webtest @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Catalog.API/GetCatalogFiltered.webtest b/test/Services/LoadTest/Catalog.API/GetCatalogFiltered.webtest new file mode 100644 index 000000000..aa0d32c89 --- /dev/null +++ b/test/Services/LoadTest/Catalog.API/GetCatalogFiltered.webtest @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Catalog.API/GetCatalogTypes.webtest b/test/Services/LoadTest/Catalog.API/GetCatalogTypes.webtest new file mode 100644 index 000000000..7c5d08c94 --- /dev/null +++ b/test/Services/LoadTest/Catalog.API/GetCatalogTypes.webtest @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Catalog.API/GetItem.webtest b/test/Services/LoadTest/Catalog.API/GetItem.webtest new file mode 100644 index 000000000..bb187e0ee --- /dev/null +++ b/test/Services/LoadTest/Catalog.API/GetItem.webtest @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Catalog.API/GetItemPic.webtest b/test/Services/LoadTest/Catalog.API/GetItemPic.webtest new file mode 100644 index 000000000..715e09172 --- /dev/null +++ b/test/Services/LoadTest/Catalog.API/GetItemPic.webtest @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Catalog.API/GetItems.webtest b/test/Services/LoadTest/Catalog.API/GetItems.webtest new file mode 100644 index 000000000..86dc6ab80 --- /dev/null +++ b/test/Services/LoadTest/Catalog.API/GetItems.webtest @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Catalog.API/GetItemsByName.webtest b/test/Services/LoadTest/Catalog.API/GetItemsByName.webtest new file mode 100644 index 000000000..5306dcd68 --- /dev/null +++ b/test/Services/LoadTest/Catalog.API/GetItemsByName.webtest @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/GetItemCoded.cs b/test/Services/LoadTest/GetItemCoded.cs new file mode 100644 index 000000000..e2c9162ec --- /dev/null +++ b/test/Services/LoadTest/GetItemCoded.cs @@ -0,0 +1,45 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace LoadTest { + using System; + using System.Collections.Generic; + using System.Text; + using Microsoft.VisualStudio.TestTools.WebTesting; + using Microsoft.VisualStudio.TestTools.WebTesting.Rules; + + + public class GetItemCoded : WebTest { + + public GetItemCoded() { + this.Context.Add("WebServer", ""); + this.PreAuthenticate = true; + this.Proxy = "default"; + } + + public override IEnumerator GetRequestEnumerator() { + // Initialize validation rules that apply to all requests in the WebTest + if ((this.Context.ValidationLevel >= Microsoft.VisualStudio.TestTools.WebTesting.ValidationLevel.Low)) { + ValidateResponseUrl validationRule1 = new ValidateResponseUrl(); + this.ValidateResponse += new EventHandler(validationRule1.Validate); + } + if ((this.Context.ValidationLevel >= Microsoft.VisualStudio.TestTools.WebTesting.ValidationLevel.Low)) { + ValidationRuleResponseTimeGoal validationRule2 = new ValidationRuleResponseTimeGoal(); + validationRule2.Tolerance = 0D; + this.ValidateResponseOnPageComplete += new EventHandler(validationRule2.Validate); + } + + WebTestRequest request1 = new WebTestRequest((this.Context["WebServer"].ToString() + "/api/v1/Catalog/Items/1")); + request1.Headers.Add(new WebTestRequestHeader("Referer", (this.Context["WebServer"].ToString() + "/swagger/"))); + yield return request1; + request1 = null; + } + } +} diff --git a/test/Services/LoadTest/LoadTest.csproj b/test/Services/LoadTest/LoadTest.csproj index 65ba7779a..8b4b86b08 100644 --- a/test/Services/LoadTest/LoadTest.csproj +++ b/test/Services/LoadTest/LoadTest.csproj @@ -51,10 +51,35 @@ + + + PreserveNewest + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + PreserveNewest + Always @@ -78,8 +103,6 @@ - - diff --git a/test/Services/LoadTest/WebMVC/AddProducts.webtest b/test/Services/LoadTest/WebMVC/AddProducts.webtest index 9984ed55e..27866030d 100644 --- a/test/Services/LoadTest/WebMVC/AddProducts.webtest +++ b/test/Services/LoadTest/WebMVC/AddProducts.webtest @@ -12,21 +12,9 @@ - - - - -
- - - - -
- - - + -
+
diff --git a/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest b/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest index 1f60026a7..eb498329f 100644 --- a/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest +++ b/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest @@ -1,21 +1,9 @@  - - - - -
- - - - -
- - - + -
+
@@ -62,19 +50,7 @@ - - - - -
- - - - -
- - - +
@@ -105,21 +81,21 @@ - + - + -
+
- + -
+
-
+
@@ -136,21 +112,9 @@ - - - - -
- - - - -
- - - + -
+
diff --git a/test/Services/LoadTest/WebMVC/CatalogFilter.webtest b/test/Services/LoadTest/WebMVC/CatalogFilter.webtest index 2cbbfbda8..8765dc042 100644 --- a/test/Services/LoadTest/WebMVC/CatalogFilter.webtest +++ b/test/Services/LoadTest/WebMVC/CatalogFilter.webtest @@ -1,21 +1,9 @@  - - - - -
- - - - -
- - - + -
+
@@ -62,19 +50,7 @@ - - - - -
- - - - -
- - - +
@@ -94,21 +70,9 @@ - - - - -
- - - - -
- - - + -
+
@@ -140,21 +104,9 @@ - - - - -
- - - - -
- - - + -
+
@@ -186,21 +138,9 @@ - - - - -
- - - - -
- - - + -
+
@@ -211,21 +151,9 @@ - - - - -
- - - - -
- - - + -
+
diff --git a/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest b/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest index e14a30f62..019b83a0b 100644 --- a/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest +++ b/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest @@ -1,21 +1,9 @@  - - - - -
- - - - -
- - - + -
+
@@ -62,19 +50,7 @@ - - - - -
- - - - -
- - - +
@@ -94,21 +70,9 @@ - - - - -
- - - - -
- - - + -
+
@@ -123,21 +87,9 @@ - - - - -
- - - - -
- - - + -
+
@@ -166,21 +118,9 @@ - - - - -
- - - - -
- - - + -
+
@@ -270,21 +210,9 @@ - - - - -
- - - - -
- - - + -
+
@@ -306,31 +234,19 @@ - + -
+
- + -
+
- - - - -
- - - - -
- - - + -
+
diff --git a/test/Services/LoadTest/WebMVC/Login.webtest b/test/Services/LoadTest/WebMVC/Login.webtest index 17e02a408..f88f13583 100644 --- a/test/Services/LoadTest/WebMVC/Login.webtest +++ b/test/Services/LoadTest/WebMVC/Login.webtest @@ -1,21 +1,9 @@  - - - - -
- - - - -
- - - + -
+
@@ -62,19 +50,7 @@ - - - - -
- - - - -
- - - +
diff --git a/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest b/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest index ffb94543d..431239376 100644 --- a/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest +++ b/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest @@ -1,21 +1,9 @@  - - - - -
- - - - -
- - - + -
+
@@ -62,19 +50,7 @@ - - - - -
- - - - -
- - - +
@@ -94,21 +70,9 @@ - - - - -
- - - - -
- - - + -
+
diff --git a/test/Services/LoadTest/WebMVC/Logout.webtest b/test/Services/LoadTest/WebMVC/Logout.webtest index b8ca3e0a7..1fa2b87a9 100644 --- a/test/Services/LoadTest/WebMVC/Logout.webtest +++ b/test/Services/LoadTest/WebMVC/Logout.webtest @@ -1,21 +1,9 @@  - - - - -
- - - - -
- - - + -
+
From bbcc23d053e31ab2e568118217e4ff665f85193b Mon Sep 17 00:00:00 2001 From: Christian Arenas Date: Thu, 29 Jun 2017 20:04:33 +0200 Subject: [PATCH 4/8] Add GetBasket and GetUserCampaigns, and cleanup --- .../LoadTest/Basket.API/GetBasket.webtest | 97 +++++++++++++++++++ .../Catalog.API/GetCatalogBrands.webtest | 4 +- .../Catalog.API/GetCatalogFiltered.webtest | 4 +- .../Catalog.API/GetCatalogTypes.webtest | 4 +- .../LoadTest/Catalog.API/GetItem.webtest | 6 +- .../LoadTest/Catalog.API/GetItemPic.webtest | 4 +- .../LoadTest/Catalog.API/GetItems.webtest | 4 +- .../Catalog.API/GetItemsByName.webtest | 4 +- test/Services/LoadTest/GetItemCoded.cs | 45 --------- test/Services/LoadTest/LoadTest.csproj | 25 +++-- .../Marketing.API/GetUserCampaigns.webtest | 89 +++++++++++++++++ .../LoadTest/WebMVC/AddProducts.webtest | 28 +++--- .../WebMVC/AddProductsWithLogin.webtest | 67 ++++++------- .../LoadTest/WebMVC/CatalogFilter.webtest | 45 ++++----- .../LoadTest/WebMVC/CreateNewOrder.webtest | 61 ++++++------ test/Services/LoadTest/WebMVC/Login.webtest | 79 --------------- .../LoadTest/WebMVC/LoginAndLogout.webtest | 33 ++++--- test/Services/LoadTest/WebMVC/Logout.webtest | 16 --- 18 files changed, 327 insertions(+), 288 deletions(-) create mode 100644 test/Services/LoadTest/Basket.API/GetBasket.webtest delete mode 100644 test/Services/LoadTest/GetItemCoded.cs create mode 100644 test/Services/LoadTest/Marketing.API/GetUserCampaigns.webtest delete mode 100644 test/Services/LoadTest/WebMVC/Login.webtest delete mode 100644 test/Services/LoadTest/WebMVC/Logout.webtest diff --git a/test/Services/LoadTest/Basket.API/GetBasket.webtest b/test/Services/LoadTest/Basket.API/GetBasket.webtest new file mode 100644 index 000000000..c3bb02e1a --- /dev/null +++ b/test/Services/LoadTest/Basket.API/GetBasket.webtest @@ -0,0 +1,97 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Catalog.API/GetCatalogBrands.webtest b/test/Services/LoadTest/Catalog.API/GetCatalogBrands.webtest index 457d7fec5..9e1cb28fb 100644 --- a/test/Services/LoadTest/Catalog.API/GetCatalogBrands.webtest +++ b/test/Services/LoadTest/Catalog.API/GetCatalogBrands.webtest @@ -1,10 +1,10 @@  - + - + diff --git a/test/Services/LoadTest/Catalog.API/GetCatalogFiltered.webtest b/test/Services/LoadTest/Catalog.API/GetCatalogFiltered.webtest index aa0d32c89..9b8a083b9 100644 --- a/test/Services/LoadTest/Catalog.API/GetCatalogFiltered.webtest +++ b/test/Services/LoadTest/Catalog.API/GetCatalogFiltered.webtest @@ -1,10 +1,10 @@  - + - + diff --git a/test/Services/LoadTest/Catalog.API/GetCatalogTypes.webtest b/test/Services/LoadTest/Catalog.API/GetCatalogTypes.webtest index 7c5d08c94..8c3313274 100644 --- a/test/Services/LoadTest/Catalog.API/GetCatalogTypes.webtest +++ b/test/Services/LoadTest/Catalog.API/GetCatalogTypes.webtest @@ -1,10 +1,10 @@  - + - + diff --git a/test/Services/LoadTest/Catalog.API/GetItem.webtest b/test/Services/LoadTest/Catalog.API/GetItem.webtest index bb187e0ee..191c617e0 100644 --- a/test/Services/LoadTest/Catalog.API/GetItem.webtest +++ b/test/Services/LoadTest/Catalog.API/GetItem.webtest @@ -1,10 +1,10 @@  - + - + - + diff --git a/test/Services/LoadTest/Catalog.API/GetItemPic.webtest b/test/Services/LoadTest/Catalog.API/GetItemPic.webtest index 715e09172..149fd309f 100644 --- a/test/Services/LoadTest/Catalog.API/GetItemPic.webtest +++ b/test/Services/LoadTest/Catalog.API/GetItemPic.webtest @@ -1,10 +1,10 @@  - + - + diff --git a/test/Services/LoadTest/Catalog.API/GetItems.webtest b/test/Services/LoadTest/Catalog.API/GetItems.webtest index 86dc6ab80..54f8d324d 100644 --- a/test/Services/LoadTest/Catalog.API/GetItems.webtest +++ b/test/Services/LoadTest/Catalog.API/GetItems.webtest @@ -1,10 +1,10 @@  - + - + diff --git a/test/Services/LoadTest/Catalog.API/GetItemsByName.webtest b/test/Services/LoadTest/Catalog.API/GetItemsByName.webtest index 5306dcd68..8810d9fd8 100644 --- a/test/Services/LoadTest/Catalog.API/GetItemsByName.webtest +++ b/test/Services/LoadTest/Catalog.API/GetItemsByName.webtest @@ -1,10 +1,10 @@  - + - + diff --git a/test/Services/LoadTest/GetItemCoded.cs b/test/Services/LoadTest/GetItemCoded.cs deleted file mode 100644 index e2c9162ec..000000000 --- a/test/Services/LoadTest/GetItemCoded.cs +++ /dev/null @@ -1,45 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace LoadTest { - using System; - using System.Collections.Generic; - using System.Text; - using Microsoft.VisualStudio.TestTools.WebTesting; - using Microsoft.VisualStudio.TestTools.WebTesting.Rules; - - - public class GetItemCoded : WebTest { - - public GetItemCoded() { - this.Context.Add("WebServer", ""); - this.PreAuthenticate = true; - this.Proxy = "default"; - } - - public override IEnumerator GetRequestEnumerator() { - // Initialize validation rules that apply to all requests in the WebTest - if ((this.Context.ValidationLevel >= Microsoft.VisualStudio.TestTools.WebTesting.ValidationLevel.Low)) { - ValidateResponseUrl validationRule1 = new ValidateResponseUrl(); - this.ValidateResponse += new EventHandler(validationRule1.Validate); - } - if ((this.Context.ValidationLevel >= Microsoft.VisualStudio.TestTools.WebTesting.ValidationLevel.Low)) { - ValidationRuleResponseTimeGoal validationRule2 = new ValidationRuleResponseTimeGoal(); - validationRule2.Tolerance = 0D; - this.ValidateResponseOnPageComplete += new EventHandler(validationRule2.Validate); - } - - WebTestRequest request1 = new WebTestRequest((this.Context["WebServer"].ToString() + "/api/v1/Catalog/Items/1")); - request1.Headers.Add(new WebTestRequestHeader("Referer", (this.Context["WebServer"].ToString() + "/swagger/"))); - yield return request1; - request1 = null; - } - } -} diff --git a/test/Services/LoadTest/LoadTest.csproj b/test/Services/LoadTest/LoadTest.csproj index 8b4b86b08..958788b2b 100644 --- a/test/Services/LoadTest/LoadTest.csproj +++ b/test/Services/LoadTest/LoadTest.csproj @@ -51,13 +51,12 @@ - - - PreserveNewest + + Always Always @@ -80,21 +79,22 @@ PreserveNewest + + Always + Designer + + + PreserveNewest + + + Always + Always - - PreserveNewest - PreserveNewest - - Always - - - Always - PreserveNewest @@ -104,7 +104,6 @@ - diff --git a/test/Services/LoadTest/Marketing.API/GetUserCampaigns.webtest b/test/Services/LoadTest/Marketing.API/GetUserCampaigns.webtest new file mode 100644 index 000000000..41928a052 --- /dev/null +++ b/test/Services/LoadTest/Marketing.API/GetUserCampaigns.webtest @@ -0,0 +1,89 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/WebMVC/AddProducts.webtest b/test/Services/LoadTest/WebMVC/AddProducts.webtest index 27866030d..b92ac98c0 100644 --- a/test/Services/LoadTest/WebMVC/AddProducts.webtest +++ b/test/Services/LoadTest/WebMVC/AddProducts.webtest @@ -1,7 +1,7 @@  - + - + @@ -12,28 +12,30 @@ - + -
+
- + - - - - - - - + + + + + + + - + + + diff --git a/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest b/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest index eb498329f..d11af10b7 100644 --- a/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest +++ b/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest @@ -1,9 +1,9 @@  - + -
+
@@ -27,9 +27,9 @@ - + -
+
@@ -40,19 +40,19 @@ - + - + - + - + -
+
@@ -63,14 +63,14 @@ - - + + - - + + - + @@ -81,40 +81,28 @@ - - - - -
- - - - -
- - - + -
+
- + - - - - - - - + + + + + + + - + -
+
@@ -122,10 +110,11 @@ - + + diff --git a/test/Services/LoadTest/WebMVC/CatalogFilter.webtest b/test/Services/LoadTest/WebMVC/CatalogFilter.webtest index 8765dc042..aca8f2821 100644 --- a/test/Services/LoadTest/WebMVC/CatalogFilter.webtest +++ b/test/Services/LoadTest/WebMVC/CatalogFilter.webtest @@ -1,9 +1,9 @@  - + -
+
@@ -27,9 +27,9 @@ - + -
+
@@ -40,19 +40,19 @@ - + - + - + - + -
+
@@ -63,16 +63,16 @@ - - + + - - + + - + -
+
@@ -104,9 +104,9 @@ - + -
+
@@ -138,9 +138,9 @@ - + -
+
@@ -151,9 +151,9 @@ - + -
+
@@ -161,9 +161,10 @@ - + + diff --git a/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest b/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest index 019b83a0b..5feb3aa0a 100644 --- a/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest +++ b/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest @@ -1,9 +1,9 @@  - + -
+
@@ -27,9 +27,9 @@ - + -
+
@@ -40,19 +40,19 @@ - + - + - + - + -
+
@@ -63,16 +63,16 @@ - - + + - - + + - + -
+
@@ -82,14 +82,14 @@ - + - + -
+
@@ -118,9 +118,9 @@ - + -
+
@@ -210,9 +210,9 @@ - + -
+
@@ -223,7 +223,7 @@ - + @@ -234,19 +234,19 @@ - + -
+
- + -
+
- + -
+
@@ -254,9 +254,10 @@ - + + diff --git a/test/Services/LoadTest/WebMVC/Login.webtest b/test/Services/LoadTest/WebMVC/Login.webtest deleted file mode 100644 index f88f13583..000000000 --- a/test/Services/LoadTest/WebMVC/Login.webtest +++ /dev/null @@ -1,79 +0,0 @@ - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest b/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest index 431239376..b1b507518 100644 --- a/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest +++ b/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest @@ -1,9 +1,9 @@  - + -
+
@@ -27,9 +27,9 @@ - + -
+
@@ -40,19 +40,19 @@ - + - + - + - + -
+
@@ -63,16 +63,16 @@ - - + + - - + + - + -
+
@@ -80,8 +80,9 @@ - + + \ No newline at end of file diff --git a/test/Services/LoadTest/WebMVC/Logout.webtest b/test/Services/LoadTest/WebMVC/Logout.webtest deleted file mode 100644 index 1fa2b87a9..000000000 --- a/test/Services/LoadTest/WebMVC/Logout.webtest +++ /dev/null @@ -1,16 +0,0 @@ - - - - - -
- - - - - - - - - - \ No newline at end of file From ee8da2399926a1f52d4c5b5f61c23dd8c80e5e34 Mon Sep 17 00:00:00 2001 From: Christian Arenas Date: Fri, 30 Jun 2017 15:05:45 +0200 Subject: [PATCH 5/8] Add basket test --- .../LoadTest/Basket.API/AddBasket.webtest | 92 ++++++++++++++++++ .../LoadTest/Basket.API/Checkout.webtest | 94 +++++++++++++++++++ .../LoadTest/Basket.API/DeleteBasket.webtest | 91 ++++++++++++++++++ .../LoadTest/Basket.API/GetBasket.webtest | 48 +++++----- test/Services/LoadTest/LoadTest.csproj | 28 +++++- .../CreateOrUpdateUserLocation.webtest | 92 ++++++++++++++++++ .../Location.API/GetAllLocations.webtest | 91 ++++++++++++++++++ .../LoadTest/Location.API/GetLocation.webtest | 92 ++++++++++++++++++ .../Location.API/GetUserLocation.webtest | 92 ++++++++++++++++++ .../Marketing.API/GetAllCampaigns.webtest | 91 ++++++++++++++++++ .../Marketing.API/GetCampaign.webtest | 92 ++++++++++++++++++ .../Marketing.API/GetUserCampaigns.webtest | 40 ++++---- .../WebMVC/AddProductsWithLogin.webtest | 4 +- .../LoadTest/WebMVC/CatalogFilter.webtest | 4 +- .../LoadTest/WebMVC/CreateNewOrder.webtest | 4 +- .../LoadTest/WebMVC/LoginAndLogout.webtest | 4 +- 16 files changed, 902 insertions(+), 57 deletions(-) create mode 100644 test/Services/LoadTest/Basket.API/AddBasket.webtest create mode 100644 test/Services/LoadTest/Basket.API/Checkout.webtest create mode 100644 test/Services/LoadTest/Basket.API/DeleteBasket.webtest create mode 100644 test/Services/LoadTest/Location.API/CreateOrUpdateUserLocation.webtest create mode 100644 test/Services/LoadTest/Location.API/GetAllLocations.webtest create mode 100644 test/Services/LoadTest/Location.API/GetLocation.webtest create mode 100644 test/Services/LoadTest/Location.API/GetUserLocation.webtest create mode 100644 test/Services/LoadTest/Marketing.API/GetAllCampaigns.webtest create mode 100644 test/Services/LoadTest/Marketing.API/GetCampaign.webtest diff --git a/test/Services/LoadTest/Basket.API/AddBasket.webtest b/test/Services/LoadTest/Basket.API/AddBasket.webtest new file mode 100644 index 000000000..b50f64aef --- /dev/null +++ b/test/Services/LoadTest/Basket.API/AddBasket.webtest @@ -0,0 +1,92 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + ewAiAEIAdQB5AGUAcgBJAGQAIgA6ACIAYQBjADEAMAAwAGYAZgBjAC0AOABmADAANwAtADQAMQAzADAALQBhADMAZgA0AC0AMAA2AGYAOQBlADEAZQA4ADkANABhADQAIgB9AA== + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Basket.API/Checkout.webtest b/test/Services/LoadTest/Basket.API/Checkout.webtest new file mode 100644 index 000000000..a387f9c02 --- /dev/null +++ b/test/Services/LoadTest/Basket.API/Checkout.webtest @@ -0,0 +1,94 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+
+ + ewAiAEMAaQB0AHkAIgA6ACIAYwBpAHQAeQAiACwAIgBTAHQAcgBlAGUAdAAiADoAIgBzAHQAcgBlAGUAdAAiACwAIgBTAHQAYQB0AGUAIgA6ACIAcwB0AGEAdABlACIALAAiAEMAbwB1AG4AdAByAHkAIgA6ACIAYwBvAHUAdAByAHkAIgAsACIAWgBpAHAAQwBvAGQAZQAiADoAIgB6AGkAcABjAG8AZABlACIALAAiAEMAYQByAGQATgB1AG0AYgBlAHIAIgA6ACIAQwBhAHIAZABOAHUAbQBiAGUAcgAiACwAIgBDAGEAcgBkAEgAbwBsAGQAZQByAE4AYQBtAGUAIgA6ACIAQwBhAHIAZABIAG8AbABkAGUAcgBOAGEAbQBlACIALAAiAEMAYQByAGQARQB4AHAAaQByAGEAdABpAG8AbgAiADoAIgAyADAAMQA3AC0AMAA2AC0AMwAwAFQAMQAyADoAMgA1ADoAMwAxAC4AOAA3ADQANwAyADIANwBaACIALAAiAEMAYQByAGQAUwBlAGMAdQByAGkAdAB5AE4AdQBtAGIAZQByACIAOgAiADEAMgAzADQAIgAsACIAQwBhAHIAZABUAHkAcABlAEkAZAAiADoAMQAsACIAQgB1AHkAZQByACIAOgAiAEIAdQB5AGUAcgAiACwAIgBSAGUAcQB1AGUAcwB0AEkAZAAiADoAIgBlAGIAOAAwADAAMwA2ADQALQBiADQAZQAxAC0ANAA2AGUAYgAtADkAMgAzADUALQBlADgAYwA0ADcANAA3AGQAYQAyAGQANAAiAH0A + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Basket.API/DeleteBasket.webtest b/test/Services/LoadTest/Basket.API/DeleteBasket.webtest new file mode 100644 index 000000000..b8a25d080 --- /dev/null +++ b/test/Services/LoadTest/Basket.API/DeleteBasket.webtest @@ -0,0 +1,91 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Basket.API/GetBasket.webtest b/test/Services/LoadTest/Basket.API/GetBasket.webtest index c3bb02e1a..79369ac0e 100644 --- a/test/Services/LoadTest/Basket.API/GetBasket.webtest +++ b/test/Services/LoadTest/Basket.API/GetBasket.webtest @@ -1,7 +1,7 @@  - +
@@ -29,7 +29,7 @@ -
+
@@ -40,51 +40,45 @@ - + - + - + -
+
- - - - - - - - - - + + + + + + + + + + -
+
- - - - - - - - - - + + + + diff --git a/test/Services/LoadTest/LoadTest.csproj b/test/Services/LoadTest/LoadTest.csproj index 958788b2b..5c8d848b0 100644 --- a/test/Services/LoadTest/LoadTest.csproj +++ b/test/Services/LoadTest/LoadTest.csproj @@ -55,6 +55,15 @@ + + Always + + + Always + + + Always + Always @@ -79,11 +88,25 @@ PreserveNewest + + Always + + + Always + + + Always + + + Always + + + Always + Always - Designer - + PreserveNewest @@ -103,7 +126,6 @@ - diff --git a/test/Services/LoadTest/Location.API/CreateOrUpdateUserLocation.webtest b/test/Services/LoadTest/Location.API/CreateOrUpdateUserLocation.webtest new file mode 100644 index 000000000..2f8739585 --- /dev/null +++ b/test/Services/LoadTest/Location.API/CreateOrUpdateUserLocation.webtest @@ -0,0 +1,92 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + ewAiAEwAbwBuAGcAaQB0AHUAZABlACIAOgAtADEAMgAxAC4AMAA0ADAAMwA2ACwAIgBMAGEAdABpAHQAdQBkAGUAIgA6ADQAOAAuADAAOQAxADYAMwAxAH0A + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Location.API/GetAllLocations.webtest b/test/Services/LoadTest/Location.API/GetAllLocations.webtest new file mode 100644 index 000000000..a759235d3 --- /dev/null +++ b/test/Services/LoadTest/Location.API/GetAllLocations.webtest @@ -0,0 +1,91 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Location.API/GetLocation.webtest b/test/Services/LoadTest/Location.API/GetLocation.webtest new file mode 100644 index 000000000..65148277e --- /dev/null +++ b/test/Services/LoadTest/Location.API/GetLocation.webtest @@ -0,0 +1,92 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Location.API/GetUserLocation.webtest b/test/Services/LoadTest/Location.API/GetUserLocation.webtest new file mode 100644 index 000000000..e0d8aeeff --- /dev/null +++ b/test/Services/LoadTest/Location.API/GetUserLocation.webtest @@ -0,0 +1,92 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Marketing.API/GetAllCampaigns.webtest b/test/Services/LoadTest/Marketing.API/GetAllCampaigns.webtest new file mode 100644 index 000000000..2a55d7e36 --- /dev/null +++ b/test/Services/LoadTest/Marketing.API/GetAllCampaigns.webtest @@ -0,0 +1,91 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Marketing.API/GetCampaign.webtest b/test/Services/LoadTest/Marketing.API/GetCampaign.webtest new file mode 100644 index 000000000..9c222b9db --- /dev/null +++ b/test/Services/LoadTest/Marketing.API/GetCampaign.webtest @@ -0,0 +1,92 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Marketing.API/GetUserCampaigns.webtest b/test/Services/LoadTest/Marketing.API/GetUserCampaigns.webtest index 41928a052..28d898eeb 100644 --- a/test/Services/LoadTest/Marketing.API/GetUserCampaigns.webtest +++ b/test/Services/LoadTest/Marketing.API/GetUserCampaigns.webtest @@ -1,7 +1,7 @@  - + - +
@@ -29,7 +29,7 @@ -
+
@@ -40,35 +40,37 @@ - + - + - + -
- - - - -
-
- - - - -
+
- + + + + + + + + + + +
+
+ + diff --git a/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest b/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest index d11af10b7..cba88f6a7 100644 --- a/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest +++ b/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest @@ -110,11 +110,11 @@ - + + - diff --git a/test/Services/LoadTest/WebMVC/CatalogFilter.webtest b/test/Services/LoadTest/WebMVC/CatalogFilter.webtest index aca8f2821..62d76dd3d 100644 --- a/test/Services/LoadTest/WebMVC/CatalogFilter.webtest +++ b/test/Services/LoadTest/WebMVC/CatalogFilter.webtest @@ -161,10 +161,10 @@ - + - + diff --git a/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest b/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest index 5feb3aa0a..43d515fee 100644 --- a/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest +++ b/test/Services/LoadTest/WebMVC/CreateNewOrder.webtest @@ -254,10 +254,10 @@ - + - + diff --git a/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest b/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest index b1b507518..5475d5695 100644 --- a/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest +++ b/test/Services/LoadTest/WebMVC/LoginAndLogout.webtest @@ -82,7 +82,7 @@ - - + + \ No newline at end of file From 1837bf20321b09543dabfaa781138a5cc9e59ff4 Mon Sep 17 00:00:00 2001 From: Christian Arenas Date: Sat, 1 Jul 2017 00:11:12 +0200 Subject: [PATCH 6/8] Add Ordering Api test and cleanup tests --- .../Catalog.API/GetCatalogBrands.webtest | 2 +- .../Catalog.API/GetCatalogFiltered.webtest | 2 +- .../Catalog.API/GetCatalogTypes.webtest | 2 +- .../LoadTest/Catalog.API/GetItem.webtest | 2 +- .../LoadTest/Catalog.API/GetItemPic.webtest | 2 +- .../LoadTest/Catalog.API/GetItems.webtest | 2 +- .../Catalog.API/GetItemsByName.webtest | 2 +- test/Services/LoadTest/LoadTest.csproj | 19 +++- .../Marketing.API/GetAllCampaigns.webtest | 2 +- .../Marketing.API/GetCampaign.webtest | 2 +- .../LoadTest/Ordering.API/CancelOrder.webtest | 94 +++++++++++++++++++ .../Ordering.API/GetAllOrders.webtest | 91 ++++++++++++++++++ .../Ordering.API/GetCardTypes.webtest | 91 ++++++++++++++++++ .../LoadTest/Ordering.API/GetOrder.webtest | 92 ++++++++++++++++++ .../LoadTest/Ordering.API/ShipOrder.webtest | 94 +++++++++++++++++++ .../WebMVC/AddProductsWithLogin.webtest | 4 +- 16 files changed, 489 insertions(+), 14 deletions(-) create mode 100644 test/Services/LoadTest/Ordering.API/CancelOrder.webtest create mode 100644 test/Services/LoadTest/Ordering.API/GetAllOrders.webtest create mode 100644 test/Services/LoadTest/Ordering.API/GetCardTypes.webtest create mode 100644 test/Services/LoadTest/Ordering.API/GetOrder.webtest create mode 100644 test/Services/LoadTest/Ordering.API/ShipOrder.webtest diff --git a/test/Services/LoadTest/Catalog.API/GetCatalogBrands.webtest b/test/Services/LoadTest/Catalog.API/GetCatalogBrands.webtest index 9e1cb28fb..ba4224c13 100644 --- a/test/Services/LoadTest/Catalog.API/GetCatalogBrands.webtest +++ b/test/Services/LoadTest/Catalog.API/GetCatalogBrands.webtest @@ -4,7 +4,7 @@ - + diff --git a/test/Services/LoadTest/Catalog.API/GetCatalogFiltered.webtest b/test/Services/LoadTest/Catalog.API/GetCatalogFiltered.webtest index 9b8a083b9..e273211b4 100644 --- a/test/Services/LoadTest/Catalog.API/GetCatalogFiltered.webtest +++ b/test/Services/LoadTest/Catalog.API/GetCatalogFiltered.webtest @@ -4,7 +4,7 @@ - + diff --git a/test/Services/LoadTest/Catalog.API/GetCatalogTypes.webtest b/test/Services/LoadTest/Catalog.API/GetCatalogTypes.webtest index 8c3313274..7c7bbadf2 100644 --- a/test/Services/LoadTest/Catalog.API/GetCatalogTypes.webtest +++ b/test/Services/LoadTest/Catalog.API/GetCatalogTypes.webtest @@ -4,7 +4,7 @@ - + diff --git a/test/Services/LoadTest/Catalog.API/GetItem.webtest b/test/Services/LoadTest/Catalog.API/GetItem.webtest index 191c617e0..11ee2e39f 100644 --- a/test/Services/LoadTest/Catalog.API/GetItem.webtest +++ b/test/Services/LoadTest/Catalog.API/GetItem.webtest @@ -4,7 +4,7 @@ - + diff --git a/test/Services/LoadTest/Catalog.API/GetItemPic.webtest b/test/Services/LoadTest/Catalog.API/GetItemPic.webtest index 149fd309f..3fe51a341 100644 --- a/test/Services/LoadTest/Catalog.API/GetItemPic.webtest +++ b/test/Services/LoadTest/Catalog.API/GetItemPic.webtest @@ -4,7 +4,7 @@ - + diff --git a/test/Services/LoadTest/Catalog.API/GetItems.webtest b/test/Services/LoadTest/Catalog.API/GetItems.webtest index 54f8d324d..f7d826d6e 100644 --- a/test/Services/LoadTest/Catalog.API/GetItems.webtest +++ b/test/Services/LoadTest/Catalog.API/GetItems.webtest @@ -4,7 +4,7 @@ - + diff --git a/test/Services/LoadTest/Catalog.API/GetItemsByName.webtest b/test/Services/LoadTest/Catalog.API/GetItemsByName.webtest index 8810d9fd8..f829ba5ab 100644 --- a/test/Services/LoadTest/Catalog.API/GetItemsByName.webtest +++ b/test/Services/LoadTest/Catalog.API/GetItemsByName.webtest @@ -4,7 +4,7 @@ - + diff --git a/test/Services/LoadTest/LoadTest.csproj b/test/Services/LoadTest/LoadTest.csproj index 5c8d848b0..374492daa 100644 --- a/test/Services/LoadTest/LoadTest.csproj +++ b/test/Services/LoadTest/LoadTest.csproj @@ -109,6 +109,21 @@ PreserveNewest + + Always + + + Always + + + PreserveNewest + + + PreserveNewest + + + Always + Always @@ -125,9 +140,7 @@ PreserveNewest - - - + diff --git a/test/Services/LoadTest/Marketing.API/GetAllCampaigns.webtest b/test/Services/LoadTest/Marketing.API/GetAllCampaigns.webtest index 2a55d7e36..183c24a1f 100644 --- a/test/Services/LoadTest/Marketing.API/GetAllCampaigns.webtest +++ b/test/Services/LoadTest/Marketing.API/GetAllCampaigns.webtest @@ -1,5 +1,5 @@  - + diff --git a/test/Services/LoadTest/Marketing.API/GetCampaign.webtest b/test/Services/LoadTest/Marketing.API/GetCampaign.webtest index 9c222b9db..3775e3694 100644 --- a/test/Services/LoadTest/Marketing.API/GetCampaign.webtest +++ b/test/Services/LoadTest/Marketing.API/GetCampaign.webtest @@ -1,5 +1,5 @@  - + diff --git a/test/Services/LoadTest/Ordering.API/CancelOrder.webtest b/test/Services/LoadTest/Ordering.API/CancelOrder.webtest new file mode 100644 index 000000000..2c4b39e9f --- /dev/null +++ b/test/Services/LoadTest/Ordering.API/CancelOrder.webtest @@ -0,0 +1,94 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+
+ + ewAiAE8AcgBkAGUAcgBOAHUAbQBiAGUAcgAiADoAIAAxAH0A + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Ordering.API/GetAllOrders.webtest b/test/Services/LoadTest/Ordering.API/GetAllOrders.webtest new file mode 100644 index 000000000..fd30d2519 --- /dev/null +++ b/test/Services/LoadTest/Ordering.API/GetAllOrders.webtest @@ -0,0 +1,91 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Ordering.API/GetCardTypes.webtest b/test/Services/LoadTest/Ordering.API/GetCardTypes.webtest new file mode 100644 index 000000000..72395a7b2 --- /dev/null +++ b/test/Services/LoadTest/Ordering.API/GetCardTypes.webtest @@ -0,0 +1,91 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Ordering.API/GetOrder.webtest b/test/Services/LoadTest/Ordering.API/GetOrder.webtest new file mode 100644 index 000000000..b3341290f --- /dev/null +++ b/test/Services/LoadTest/Ordering.API/GetOrder.webtest @@ -0,0 +1,92 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/Ordering.API/ShipOrder.webtest b/test/Services/LoadTest/Ordering.API/ShipOrder.webtest new file mode 100644 index 000000000..bdeaae363 --- /dev/null +++ b/test/Services/LoadTest/Ordering.API/ShipOrder.webtest @@ -0,0 +1,94 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+
+ + ewAiAE8AcgBkAGUAcgBOAHUAbQBiAGUAcgAiADoAIAAxAH0A + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest b/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest index cba88f6a7..eb1110ef6 100644 --- a/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest +++ b/test/Services/LoadTest/WebMVC/AddProductsWithLogin.webtest @@ -110,8 +110,8 @@ - - + + From 595988779f73a08619a5f57b9a7b1092c3230bf9 Mon Sep 17 00:00:00 2001 From: Christian Arenas Date: Tue, 4 Jul 2017 08:47:54 +0200 Subject: [PATCH 7/8] Add GetItems load test --- .../LoadTest/Catalog.API/GetItems.loadtest | 443 ++++++++++++++++++ 1 file changed, 443 insertions(+) create mode 100644 test/Services/LoadTest/Catalog.API/GetItems.loadtest diff --git a/test/Services/LoadTest/Catalog.API/GetItems.loadtest b/test/Services/LoadTest/Catalog.API/GetItems.loadtest new file mode 100644 index 000000000..5b8da9703 --- /dev/null +++ b/test/Services/LoadTest/Catalog.API/GetItems.loadtest @@ -0,0 +1,443 @@ + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 540f7510b953e2730fd378a562d01aad2d236965 Mon Sep 17 00:00:00 2001 From: Christian Arenas Date: Mon, 10 Jul 2017 14:25:03 +0200 Subject: [PATCH 8/8] Create a mvctest client, check when is the environment variable UseLoadTest in MVC project to true --- .../Identity.API/Configuration/Config.cs | 32 +++++++++++++++++++ src/Web/WebMVC/Startup.cs | 11 ++++--- src/Web/WebMVC/appsettings.json | 1 + .../Ordering.API/GetCardTypes.webtest | 2 +- 4 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/Services/Identity/Identity.API/Configuration/Config.cs b/src/Services/Identity/Identity.API/Configuration/Config.cs index 4aa12d4ce..bce62b039 100644 --- a/src/Services/Identity/Identity.API/Configuration/Config.cs +++ b/src/Services/Identity/Identity.API/Configuration/Config.cs @@ -114,6 +114,38 @@ namespace Identity.API.Configuration "locations", "marketing" }, + }, + new Client + { + ClientId = "mvctest", + ClientName = "MVC Client Test", + ClientSecrets = new List + { + new Secret("secret".Sha256()) + }, + ClientUri = $"{clientsUrl["Mvc"]}", // public uri of the client + AllowedGrantTypes = GrantTypes.Hybrid, + AllowAccessTokensViaBrowser = true, + RequireConsent = false, + AllowOfflineAccess = true, + RedirectUris = new List + { + $"{clientsUrl["Mvc"]}/signin-oidc" + }, + PostLogoutRedirectUris = new List + { + $"{clientsUrl["Mvc"]}/signout-callback-oidc" + }, + AllowedScopes = new List + { + IdentityServerConstants.StandardScopes.OpenId, + IdentityServerConstants.StandardScopes.Profile, + IdentityServerConstants.StandardScopes.OfflineAccess, + "orders", + "basket", + "locations", + "marketing" + }, } }; } diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs index 8147f6720..e936a7967 100644 --- a/src/Web/WebMVC/Startup.cs +++ b/src/Web/WebMVC/Startup.cs @@ -112,21 +112,22 @@ namespace Microsoft.eShopOnContainers.WebMVC var identityUrl = Configuration.GetValue("IdentityUrl"); var callBackUrl = Configuration.GetValue("CallBackUrl"); + var useLoadTest = Configuration.GetValue("UseLoadTest"); var log = loggerFactory.CreateLogger("identity"); var oidcOptions = new OpenIdConnectOptions { AuthenticationScheme = "oidc", SignInScheme = "Cookies", - Authority = identityUrl.ToString(), - PostLogoutRedirectUri = callBackUrl.ToString(), - ClientId = "mvc", + Authority = identityUrl, + PostLogoutRedirectUri = callBackUrl, ClientSecret = "secret", - ResponseType = "code id_token", + ClientId = useLoadTest ? "mvctest" : "mvc", + ResponseType = useLoadTest ? "code id_token token" : "code id_token", SaveTokens = true, GetClaimsFromUserInfoEndpoint = true, RequireHttpsMetadata = false, - Scope = { "openid", "profile", "orders", "basket", "marketing" } + Scope = { "openid", "profile", "orders", "basket", "marketing", "locations" } }; //Wait untill identity service is ready on compose. diff --git a/src/Web/WebMVC/appsettings.json b/src/Web/WebMVC/appsettings.json index 5b6c6e97f..92017774a 100644 --- a/src/Web/WebMVC/appsettings.json +++ b/src/Web/WebMVC/appsettings.json @@ -7,6 +7,7 @@ "CallBackUrl": "http://localhost:5100/", "IsClusterEnv": "False", "UseResilientHttp": "True", + "UseLoadTest": false, "Logging": { "IncludeScopes": false, "LogLevel": { diff --git a/test/Services/LoadTest/Ordering.API/GetCardTypes.webtest b/test/Services/LoadTest/Ordering.API/GetCardTypes.webtest index 72395a7b2..a07bf85f8 100644 --- a/test/Services/LoadTest/Ordering.API/GetCardTypes.webtest +++ b/test/Services/LoadTest/Ordering.API/GetCardTypes.webtest @@ -1,5 +1,5 @@  - +