You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
3.1 KiB

  1. # Load Testing settings
  2. This folder contains files needed to run load tests locally or on a Kubernetes / Service Fabric cluster.
  3. <p>
  4. <img src="../../../img/loadtests/loadtestproj_dir.png">
  5. <p>
  6. ## Set a local environment
  7. Modify the **app.config** file in the LoadTest project directory and set the following service urls.
  8. ```
  9. <Servers>
  10. <MvcWebServer url="http://localhost:5100" />
  11. <CatalogApiServer url="http://localhost:5101" />
  12. <OrderingApiServer url="http://localhost:5102" />
  13. <BasketApiServer url="http://localhost:5103" />
  14. <IdentityApiServer url="http://localhost:5105" />
  15. <LocationsApiServer url="http://localhost:5109" />
  16. <MarketingApiServer url="http://localhost:5110" />
  17. </Servers>
  18. ```
  19. Modify the **.env** file and set the following config property as shown bellow.
  20. ```
  21. USE_LOADTEST=True
  22. ```
  23. ## Set a Service Fabric environment
  24. Modify the **app.config** file in the LoadTest project directory and set the following service urls.
  25. ```
  26. <Servers>
  27. <MvcWebServer url="http://<target_sf_dns>:5100" />
  28. <CatalogApiServer url="http://<target_sf_dns>:5101" />
  29. <OrderingApiServer url="http://<target_sf_dns>:5102" />
  30. <BasketApiServer url="http://<target_sf_dns>:5103" />
  31. <IdentityApiServer url="http://<target_sf_dns>:5105" />
  32. <LocationsApiServer url="http://<target_sf_dns>:5109" />
  33. <MarketingApiServer url="http://<target_sf_dns>:5110" />
  34. </Servers>
  35. ```
  36. 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.
  37. <p>
  38. <img src="../../../img/loadtests/sfmanifestsettings.png">
  39. <p>
  40. 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.
  41. ## Set a Kubernetes environment
  42. Modify the **app.config** file in the LoadTest project directory and set the following service urls.
  43. ```
  44. <Servers>
  45. <MvcWebServer url="http://<public_ip_k8s>/webmvc" />
  46. <CatalogApiServer url="http://<public_ip_k8s>/catalog-api" />
  47. <OrderingApiServer url="http://<public_ip_k8s>/ordering-api" />
  48. <BasketApiServer url="http://<public_ip_k8s>/basket-api" />
  49. <IdentityApiServer url="http://<public_ip_k8s>/identity" />
  50. <LocationsApiServer url="http://<public_ip_k8s>/locations-api" />
  51. <MarketingApiServer url="http://<public_ip_k8s>/marketing-api" />
  52. </Servers>
  53. ```
  54. 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.
  55. <p>
  56. <img src="../../../img/loadtests/k8ssettings.png">
  57. <p>
  58. Deploy the kubernetes services. **PLEASE** Read our [k8s deployment guide](./../../../k8s/README.k8s.md) to know about how to deploy eshop on Kubernetes.
  59. ## Run Load Tests
  60. Open the load test you want to perform ***.loadtest** files and click the Run Load test button.
  61. <p>
  62. <img src="./../../../img/loadtests/runloadtest.png">
  63. <p>