generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ORV2-2780: added frontend test cases
- Loading branch information
1 parent
c277fec
commit 4c38f78
Showing
4 changed files
with
1,247 additions
and
0 deletions.
There are no files selected for viewing
304 changes: 304 additions & 0 deletions
304
loadtests/frontend/orbc_load_test_plan_frontend_amend_term_oversize.jmx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,304 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.1"> | ||
<hashTree> | ||
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"> | ||
<stringProp name="TestPlan.comments"></stringProp> | ||
<boolProp name="TestPlan.functional_mode">false</boolProp> | ||
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp> | ||
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> | ||
<collectionProp name="Arguments.arguments"> | ||
<elementProp name="Duration" elementType="Argument"> | ||
<stringProp name="Argument.name">Duration</stringProp> | ||
<stringProp name="Argument.value">3180</stringProp> | ||
<stringProp name="Argument.metadata">=</stringProp> | ||
</elementProp> | ||
</collectionProp> | ||
</elementProp> | ||
<stringProp name="TestPlan.user_define_classpath"></stringProp> | ||
</TestPlan> | ||
<hashTree> | ||
<Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> | ||
<collectionProp name="Arguments.arguments"> | ||
<elementProp name="NUM_THREADS" elementType="Argument"> | ||
<stringProp name="Argument.name">NUM_THREADS</stringProp> | ||
<stringProp name="Argument.value">200</stringProp> | ||
<stringProp name="Argument.metadata">=</stringProp> | ||
</elementProp> | ||
<elementProp name="FRONTEND_URL" elementType="Argument"> | ||
<stringProp name="Argument.name">FRONTEND_URL</stringProp> | ||
<stringProp name="Argument.value">https://onroutebc-test-frontend.apps.silver.devops.gov.bc.ca</stringProp> | ||
<stringProp name="Argument.metadata">=</stringProp> | ||
</elementProp> | ||
<elementProp name="RESULTS_DIR" elementType="Argument"> | ||
<stringProp name="Argument.name">RESULTS_DIR</stringProp> | ||
<stringProp name="Argument.value">~/results</stringProp> | ||
<stringProp name="Argument.metadata">=</stringProp> | ||
</elementProp> | ||
<elementProp name="USER" elementType="Argument"> | ||
<stringProp name="Argument.name">USER</stringProp> | ||
<stringProp name="Argument.value"></stringProp> | ||
<stringProp name="Argument.metadata">=</stringProp> | ||
</elementProp> | ||
<elementProp name="PASSWORD" elementType="Argument"> | ||
<stringProp name="Argument.name">PASSWORD</stringProp> | ||
<stringProp name="Argument.value"></stringProp> | ||
<stringProp name="Argument.metadata">=</stringProp> | ||
</elementProp> | ||
<elementProp name="AMEND_URL" elementType="Argument"> | ||
<stringProp name="Argument.name">AMEND_URL</stringProp> | ||
<stringProp name="Argument.value">https://onroutebc-test-frontend.apps.silver.devops.gov.bc.ca/companies/1/permits/421/amend</stringProp> | ||
<stringProp name="Argument.metadata">=</stringProp> | ||
</elementProp> | ||
</collectionProp> | ||
</Arguments> | ||
<hashTree/> | ||
<com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig guiclass="com.googlecode.jmeter.plugins.webdriver.config.gui.ChromeDriverConfigGui" testclass="com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig" testname="jp@gc - Chrome Driver Config" enabled="true"> | ||
<boolProp name="WebDriverConfig.acceptinsecurecerts">false</boolProp> | ||
<boolProp name="WebDriverConfig.reset_per_iteration">true</boolProp> | ||
<stringProp name="WebDriverConfig.driver_path">C:\Users\brwang\Software\chromedriver-win64\chromedriver-win64-129\chromedriver.exe</stringProp> | ||
<boolProp name="WebDriverConfig.dev_mode">false</boolProp> | ||
<boolProp name="WebDriverConfig.headless">false</boolProp> | ||
<boolProp name="WebDriverConfig.maximize_browser">true</boolProp> | ||
<stringProp name="ChromeDriverConfig.additional_args"></stringProp> | ||
<stringProp name="ChromeDriverConfig.binary_path"></stringProp> | ||
<stringProp name="WebDriverConfig.proxy_type">SYSTEM</stringProp> | ||
<stringProp name="WebDriverConfig.proxy_pac_url"></stringProp> | ||
<stringProp name="WebDriverConfig.http_host"></stringProp> | ||
<intProp name="WebDriverConfig.http_port">8080</intProp> | ||
<boolProp name="WebDriverConfig.use_http_for_all_protocols">true</boolProp> | ||
<stringProp name="WebDriverConfig.https_host"></stringProp> | ||
<intProp name="WebDriverConfig.https_port">8080</intProp> | ||
<boolProp name="WebDriverConfig.use_ftp_proxy">true</boolProp> | ||
<stringProp name="WebDriverConfig.ftp_host"></stringProp> | ||
<intProp name="WebDriverConfig.ftp_port">8080</intProp> | ||
<boolProp name="WebDriverConfig.use_socks_proxy">true</boolProp> | ||
<stringProp name="WebDriverConfig.socks_host"></stringProp> | ||
<intProp name="WebDriverConfig.socks_port">8080</intProp> | ||
<stringProp name="WebDriverConfig.no_proxy">localhost</stringProp> | ||
<stringProp name="WebDriverConfig.custom_capabilites"></stringProp> | ||
</com.googlecode.jmeter.plugins.webdriver.config.ChromeDriverConfig> | ||
<hashTree/> | ||
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true"> | ||
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp> | ||
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> | ||
<boolProp name="LoopController.continue_forever">false</boolProp> | ||
<stringProp name="LoopController.loops">1</stringProp> | ||
</elementProp> | ||
<stringProp name="ThreadGroup.num_threads">1</stringProp> | ||
<stringProp name="ThreadGroup.ramp_time">1</stringProp> | ||
<boolProp name="ThreadGroup.scheduler">false</boolProp> | ||
<stringProp name="ThreadGroup.duration"></stringProp> | ||
<stringProp name="ThreadGroup.delay"></stringProp> | ||
<boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp> | ||
</ThreadGroup> | ||
<hashTree> | ||
<com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler guiclass="com.googlecode.jmeter.plugins.webdriver.sampler.gui.WebDriverSamplerGui" testclass="com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler" testname="amendApplications" enabled="true"> | ||
<stringProp name="WebDriverSampler.script">import org.openqa.selenium.By | ||
import org.openqa.selenium.support.ui.ExpectedConditions | ||
import org.openqa.selenium.support.ui.WebDriverWait | ||
import org.openqa.selenium.WebElement | ||
|
||
WDS.sampleResult.sampleStart() | ||
def frontendUrl = WDS.vars.get("FRONTEND_URL") | ||
WDS.browser.get(frontendUrl); | ||
Thread.sleep(5000) | ||
|
||
def loginButton = WDS.browser.findElement(By.id('login-idir')) | ||
if (loginButton != null) { | ||
loginButton.click() | ||
WDS.log.info("Clicked on the login-bceid button") | ||
} else { | ||
WDS.log.info("Button with id 'login-bceid' not found") | ||
} | ||
Thread.sleep(10000) | ||
|
||
def searchIcon = WDS.browser.findElement(By.className('search-button')) | ||
searchIcon.click() | ||
Thread.sleep(5000) | ||
|
||
def company = WDS.browser.findElement(By.cssSelector('[value="companies"]')) | ||
company.click() | ||
Thread.sleep(5000) | ||
|
||
|
||
def searchInput = WDS.browser.findElement(By.className('css-1pog434')) | ||
searchInput.sendKeys('p') | ||
Thread.sleep(5000) | ||
|
||
def searchButton = WDS.browser.findElement(By.className('search-by__search')) | ||
searchButton.click() | ||
Thread.sleep(5000) | ||
|
||
def button = WDS.browser.findElement(By.xpath("//button[text()='Test Transport Inc.']")) | ||
button.click() | ||
Thread.sleep(5000) | ||
def tab = WDS.browser.findElement(By.xpath("//div[@class='tab__label' and text()='Active Permits']")) | ||
tab.click() | ||
Thread.sleep(5000) | ||
|
||
def amendUrl = WDS.vars.get("AMEND_URL") | ||
WDS.browser.get(amendUrl); | ||
Thread.sleep(5000) | ||
|
||
def year = WDS.browser.findElement(By.cssSelector('[name="permitData.vehicleDetails.year"]')) | ||
year.clear() | ||
year.sendKeys("2008") | ||
Thread.sleep(5000) | ||
|
||
def amendment = WDS.browser.findElement(By.cssSelector('[name="comment"]')) | ||
amendment.clear() | ||
amendment.sendKeys("Make year updated") | ||
Thread.sleep(5000) | ||
|
||
|
||
def continueButton = WDS.browser.findElement(By.cssSelector('[data-testid="continue-application-button"]')) | ||
Thread.sleep(5000) | ||
|
||
if (continueButton != null) { | ||
continueButton.click() | ||
WDS.log.info('Clicked the button with data-testid="continue-application-button"') | ||
} else { | ||
WDS.log.info('Button with data-testid="continue-application-button" not found') | ||
} | ||
|
||
Thread.sleep(10000) | ||
def checkboxes = WDS.browser.findElements(By.cssSelector('input[type="checkbox"]')) | ||
checkboxes.each { checkbox -> | ||
WDS.browser.executeScript("window.scrollTo(0, arguments[0].getBoundingClientRect().top + window.pageYOffset - 100);", checkbox) | ||
if (!checkbox.isSelected()) { | ||
checkbox.click() | ||
} | ||
} | ||
Thread.sleep(5000) | ||
|
||
def continueBtn = WDS.browser.findElement(By.xpath("//button[text()='Continue']")) | ||
WDS.browser.executeScript("window.scrollTo(0, arguments[0].getBoundingClientRect().top + window.pageYOffset - 100);", continueBtn) | ||
continueBtn.click() | ||
Thread.sleep(5000) | ||
|
||
def finish = WDS.browser.findElement(By.xpath("//button[text()='Finish']")) | ||
WDS.browser.executeScript("window.scrollTo(0, arguments[0].getBoundingClientRect().top + window.pageYOffset - 100);", finish) | ||
finish.click() | ||
Thread.sleep(5000) | ||
|
||
WDS.sampleResult.sampleEnd() | ||
</stringProp> | ||
<stringProp name="WebDriverSampler.parameters"></stringProp> | ||
<stringProp name="WebDriverSampler.language">groovy</stringProp> | ||
</com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler> | ||
<hashTree/> | ||
</hashTree> | ||
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> | ||
<boolProp name="ResultCollector.error_logging">false</boolProp> | ||
<objProp> | ||
<name>saveConfig</name> | ||
<value class="SampleSaveConfiguration"> | ||
<time>true</time> | ||
<latency>true</latency> | ||
<timestamp>true</timestamp> | ||
<success>true</success> | ||
<label>true</label> | ||
<code>true</code> | ||
<message>true</message> | ||
<threadName>true</threadName> | ||
<dataType>true</dataType> | ||
<encoding>false</encoding> | ||
<assertions>true</assertions> | ||
<subresults>true</subresults> | ||
<responseData>false</responseData> | ||
<samplerData>false</samplerData> | ||
<xml>false</xml> | ||
<fieldNames>true</fieldNames> | ||
<responseHeaders>false</responseHeaders> | ||
<requestHeaders>false</requestHeaders> | ||
<responseDataOnError>false</responseDataOnError> | ||
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> | ||
<assertionsResultsToSave>0</assertionsResultsToSave> | ||
<bytes>true</bytes> | ||
<sentBytes>true</sentBytes> | ||
<url>true</url> | ||
<threadCounts>true</threadCounts> | ||
<idleTime>true</idleTime> | ||
<connectTime>true</connectTime> | ||
</value> | ||
</objProp> | ||
<stringProp name="filename"></stringProp> | ||
</ResultCollector> | ||
<hashTree/> | ||
<ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="true"> | ||
<boolProp name="ResultCollector.error_logging">false</boolProp> | ||
<objProp> | ||
<name>saveConfig</name> | ||
<value class="SampleSaveConfiguration"> | ||
<time>true</time> | ||
<latency>true</latency> | ||
<timestamp>true</timestamp> | ||
<success>true</success> | ||
<label>true</label> | ||
<code>true</code> | ||
<message>true</message> | ||
<threadName>true</threadName> | ||
<dataType>true</dataType> | ||
<encoding>false</encoding> | ||
<assertions>true</assertions> | ||
<subresults>true</subresults> | ||
<responseData>false</responseData> | ||
<samplerData>false</samplerData> | ||
<xml>false</xml> | ||
<fieldNames>true</fieldNames> | ||
<responseHeaders>false</responseHeaders> | ||
<requestHeaders>false</requestHeaders> | ||
<responseDataOnError>false</responseDataOnError> | ||
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> | ||
<assertionsResultsToSave>0</assertionsResultsToSave> | ||
<bytes>true</bytes> | ||
<sentBytes>true</sentBytes> | ||
<url>true</url> | ||
<threadCounts>true</threadCounts> | ||
<idleTime>true</idleTime> | ||
<connectTime>true</connectTime> | ||
</value> | ||
</objProp> | ||
<stringProp name="filename"></stringProp> | ||
</ResultCollector> | ||
<hashTree/> | ||
<ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="Simple Data Writer" enabled="true"> | ||
<boolProp name="ResultCollector.error_logging">false</boolProp> | ||
<objProp> | ||
<name>saveConfig</name> | ||
<value class="SampleSaveConfiguration"> | ||
<time>true</time> | ||
<latency>true</latency> | ||
<timestamp>true</timestamp> | ||
<success>true</success> | ||
<label>true</label> | ||
<code>true</code> | ||
<message>true</message> | ||
<threadName>true</threadName> | ||
<dataType>true</dataType> | ||
<encoding>false</encoding> | ||
<assertions>true</assertions> | ||
<subresults>true</subresults> | ||
<responseData>false</responseData> | ||
<samplerData>false</samplerData> | ||
<xml>false</xml> | ||
<fieldNames>true</fieldNames> | ||
<responseHeaders>false</responseHeaders> | ||
<requestHeaders>false</requestHeaders> | ||
<responseDataOnError>false</responseDataOnError> | ||
<saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> | ||
<assertionsResultsToSave>0</assertionsResultsToSave> | ||
<bytes>true</bytes> | ||
<sentBytes>true</sentBytes> | ||
<url>true</url> | ||
<threadCounts>true</threadCounts> | ||
<idleTime>true</idleTime> | ||
<connectTime>true</connectTime> | ||
</value> | ||
</objProp> | ||
<stringProp name="filename">${RESULTS_DIR}/frontend.csv</stringProp> | ||
</ResultCollector> | ||
<hashTree/> | ||
</hashTree> | ||
</hashTree> | ||
</jmeterTestPlan> |
Oops, something went wrong.