[stress-tests] Adapt for NC 25
This still supports NC24 While there, configure JMeter to restart threads instead of stopping them. This keeps the load on the target server.main
parent
4a785009c5
commit
d90b432e06
|
@ -139,7 +139,7 @@
|
||||||
</ConfigTestElement>
|
</ConfigTestElement>
|
||||||
<hashTree/>
|
<hashTree/>
|
||||||
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="SAML Login Method" enabled="true">
|
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="SAML Login Method" enabled="true">
|
||||||
<stringProp name="ThreadGroup.on_sample_error">stopthread</stringProp>
|
<stringProp name="ThreadGroup.on_sample_error">startnextloop</stringProp>
|
||||||
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
|
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
|
||||||
<boolProp name="LoopController.continue_forever">false</boolProp>
|
<boolProp name="LoopController.continue_forever">false</boolProp>
|
||||||
<intProp name="LoopController.loops">-1</intProp>
|
<intProp name="LoopController.loops">-1</intProp>
|
||||||
|
@ -192,8 +192,8 @@
|
||||||
<stringProp name="TestPlan.comments">Send response from login to SP for processing</stringProp>
|
<stringProp name="TestPlan.comments">Send response from login to SP for processing</stringProp>
|
||||||
</ModuleController>
|
</ModuleController>
|
||||||
<hashTree/>
|
<hashTree/>
|
||||||
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report 20 users" enabled="true">
|
<ResultCollector guiclass="SummaryReport" testclass="ResultCollector" testname="Summary Report N users" enabled="true">
|
||||||
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
<boolProp name="ResultCollector.error_logging">true</boolProp>
|
||||||
<objProp>
|
<objProp>
|
||||||
<name>saveConfig</name>
|
<name>saveConfig</name>
|
||||||
<value class="SampleSaveConfiguration">
|
<value class="SampleSaveConfiguration">
|
||||||
|
@ -230,7 +230,7 @@
|
||||||
</ResultCollector>
|
</ResultCollector>
|
||||||
<hashTree/>
|
<hashTree/>
|
||||||
<ResultCollector guiclass="RespTimeGraphVisualizer" testclass="ResultCollector" testname="Response Time Graph" enabled="true">
|
<ResultCollector guiclass="RespTimeGraphVisualizer" testclass="ResultCollector" testname="Response Time Graph" enabled="true">
|
||||||
<boolProp name="ResultCollector.error_logging">false</boolProp>
|
<boolProp name="ResultCollector.error_logging">true</boolProp>
|
||||||
<objProp>
|
<objProp>
|
||||||
<name>saveConfig</name>
|
<name>saveConfig</name>
|
||||||
<value class="SampleSaveConfiguration">
|
<value class="SampleSaveConfiguration">
|
||||||
|
|
|
@ -20,6 +20,9 @@ from selenium.webdriver.chrome.options import Options as ChromeOptions
|
||||||
from typing import Any, Dict, Iterable, List
|
from typing import Any, Dict, Iterable, List
|
||||||
|
|
||||||
|
|
||||||
|
STEP_TIMEOUT_SECONDS = 40
|
||||||
|
|
||||||
|
|
||||||
class DDSession:
|
class DDSession:
|
||||||
driver: webdriver.Chrome
|
driver: webdriver.Chrome
|
||||||
|
|
||||||
|
@ -28,7 +31,7 @@ class DDSession:
|
||||||
instance: str,
|
instance: str,
|
||||||
users_file: str,
|
users_file: str,
|
||||||
out_dir: pathlib.Path,
|
out_dir: pathlib.Path,
|
||||||
stepTimeoutSeconds: int = 20,
|
stepTimeoutSeconds: int = STEP_TIMEOUT_SECONDS,
|
||||||
):
|
):
|
||||||
self.instance = instance
|
self.instance = instance
|
||||||
self.users_file = [
|
self.users_file = [
|
||||||
|
@ -177,6 +180,7 @@ class DDSession:
|
||||||
lambda d: (
|
lambda d: (
|
||||||
d.find_elements(By.ID, "kc-form-login")
|
d.find_elements(By.ID, "kc-form-login")
|
||||||
+ d.find_elements(By.ID, "menu-apps-icon")
|
+ d.find_elements(By.ID, "menu-apps-icon")
|
||||||
|
+ d.find_elements(By.ID, "menu-apps-btn")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -213,7 +217,7 @@ class DDSession:
|
||||||
self.screenshot("OnlyOffice", "Opening")
|
self.screenshot("OnlyOffice", "Opening")
|
||||||
|
|
||||||
# Wait for OnlyOffice to start loading
|
# Wait for OnlyOffice to start loading
|
||||||
oofCSS = "div.app-onlyoffice #app iframe"
|
oofCSS = ".app-onlyoffice #app iframe"
|
||||||
WebDriverWait(self.driver, timeout=self.stepTimeoutSeconds).until(
|
WebDriverWait(self.driver, timeout=self.stepTimeoutSeconds).until(
|
||||||
lambda d: d.find_elements(By.CSS_SELECTOR, oofCSS)
|
lambda d: d.find_elements(By.CSS_SELECTOR, oofCSS)
|
||||||
)
|
)
|
||||||
|
@ -292,13 +296,13 @@ def main_test(
|
||||||
users_file: io.TextIOWrapper,
|
users_file: io.TextIOWrapper,
|
||||||
out_dir: pathlib.Path,
|
out_dir: pathlib.Path,
|
||||||
duration: int,
|
duration: int,
|
||||||
stepTimeoutSeconds: int = 20,
|
stepTimeoutSeconds: int = STEP_TIMEOUT_SECONDS,
|
||||||
) -> DDSession:
|
) -> DDSession:
|
||||||
session = DDSession(
|
session = DDSession(
|
||||||
instance=instance,
|
instance=instance,
|
||||||
users_file=users_file.read(),
|
users_file=users_file.read(),
|
||||||
out_dir=out_dir,
|
out_dir=out_dir,
|
||||||
stepTimeoutSeconds=20,
|
stepTimeoutSeconds=stepTimeoutSeconds,
|
||||||
)
|
)
|
||||||
|
|
||||||
first_run = True
|
first_run = True
|
||||||
|
|
Loading…
Reference in New Issue