diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dbcf6ea..05e3389 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: - name: Run JMeter Tests uses: ./ with: - test-plan-path: ./TestPlans/S01_SimpleExample/S01_SimpleExample.jmx + test-plan-path: ./TestPlans/S04_StressSmokeTest/smoke_stress_test.jmx args: "-e -o ./reports/html/" - name: Upload Results diff --git a/Dockerfile b/Dockerfile index f53b419..f82eb09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ ENV JMETER_BIN "${JMETER_HOME}/bin" ENV PATH "$PATH:$JMETER_BIN" ENV JMETER_CMD_RUNNER_VERSION "2.3" ENV JMETER_PLUGIN_MANAGER_VERSION "1.9" -ENV JMETER_PLUGIN_INSTALL_LIST "jpgc-udp,jpgc-graphs-basic" +ENV JMETER_PLUGIN_INSTALL_LIST "jpgc-udp,jpgc-graphs-basic,jpgc-casutg" COPY entrypoint.sh /entrypoint.sh COPY jmeter-plugin-install.sh /jmeter-plugin-install.sh @@ -29,4 +29,4 @@ RUN apk --no-cache add curl ca-certificates openjdk17-jre && \ # Downloading CMD Runner RUN /jmeter-plugin-install.sh -ENTRYPOINT [ "/entrypoint.sh" ] +ENTRYPOINT [ "/entrypoint.sh" ] \ No newline at end of file diff --git a/TestPlans/S04_StressSmokeTest/smoke_stress_test.jmx b/TestPlans/S04_StressSmokeTest/smoke_stress_test.jmx new file mode 100644 index 0000000..4addd77 --- /dev/null +++ b/TestPlans/S04_StressSmokeTest/smoke_stress_test.jmx @@ -0,0 +1,286 @@ + + + + + + + + false + false + + + + + + host + performance-test-educator.perf.eduframe.dev + = + + + scheme + https + = + + + catalog_variant_id + = + 3 + + + payment_method_id + 2 + = + + + signup_question_id + 1 + = + + + payment_option_id + 1 + = + + + + + + ${host} + ${scheme} + + + + + + + + + false + false + + + + true + 1 + 1 + 60 + false + true + continue + + -1 + false + + + + + 0 + + throughput + 2.0 + 0.0 + + + + + 6 + 443 + UTF-8 + /api/signup/signup + true + POST + true + true + + + + false + {"creator_attributes":{"id":null,"signup_answers_attributes":[],"email":"${email}","first_name":"Abc","last_name":"Def"},"account_attributes":{"is_new":false,"key_contact":true,"email":null,"type":"personal","address_attributes":{"address":"qwerty 12","addressee":null,"postal_code":"1234qw","city":"Eindhoven","country":"NL"},"id":null,"signup_answers_attributes":[]},"signup_answers_attributes":[{"required":true,"type":"string","signup_question_id":"${signup_question_id}"}],"enrollments_attributes":[{"student_attributes":{"is_new":false,"id":null,"signup_answers_attributes":[],"address_attributes":{"address":"qwerty 12","postal_code":"1234qw","city":"Eindhoven","country":"NL"}},"creator_is_student":true}],"payment_method_id":"${payment_method_id}","catalog_variant_id":"${catalog_variant_id}","payable":true,"show_accepts_terms":true,"show_address":true,"payment_option_id":"${payment_option_id}"} + = + + + + + + + + + Sec-Fetch-Mode + cors + + + Sec-Fetch-Site + same-origin + + + Accept-Language + en-GB,en;q=0.9 + + + Origin + ${scheme}://${host} + + + Accept + */* + + + sec-ch-ua + "Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117" + + + sec-ch-ua-mobile + ?0 + + + sec-ch-ua-platform + "Windows" + + + Content-Type + application/json + + + Accept-Encoding + gzip, deflate, br + + + User-Agent + Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 + + + Sec-Fetch-Dest + empty + + + + + + + + email + + + + ${__RandomString(13,abcdefghijklmnopqrstuvwxyz,)}@gmail.com + + + true + + + + 2000 + + + + + continue + 2 + 0 + 1 + 0 + 30 + 1 + 20 + 60 + 30 + + -1 + false + + + + + 6 + 443 + UTF-8 + /api/signup/signup + true + POST + true + true + + + + false + {"creator_attributes":{"id":null,"signup_answers_attributes":[],"email":"${email}","first_name":"Abc","last_name":"Def"},"account_attributes":{"is_new":false,"key_contact":true,"email":null,"type":"personal","address_attributes":{"address":"qwerty 12","addressee":null,"postal_code":"1234qw","city":"Eindhoven","country":"NL"},"id":null,"signup_answers_attributes":[]},"signup_answers_attributes":[{"required":true,"type":"string","signup_question_id":"${signup_question_id}"}],"enrollments_attributes":[{"student_attributes":{"is_new":false,"id":null,"signup_answers_attributes":[],"address_attributes":{"address":"qwerty 12","postal_code":"1234qw","city":"Eindhoven","country":"NL"}},"creator_is_student":true}],"payment_method_id":"${payment_method_id}","catalog_variant_id":"${catalog_variant_id}","payable":true,"show_accepts_terms":true,"show_address":true,"payment_option_id":"${payment_option_id}"} + = + + + + + + + + + Sec-Fetch-Mode + cors + + + Sec-Fetch-Site + same-origin + + + Accept-Language + en-GB,en;q=0.9 + + + Origin + ${scheme}://${host} + + + Accept + */* + + + sec-ch-ua + "Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117" + + + sec-ch-ua-mobile + ?0 + + + sec-ch-ua-platform + "Windows" + + + Content-Type + application/json + + + Accept-Encoding + gzip, deflate, br + + + User-Agent + Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 + + + Sec-Fetch-Dest + empty + + + + + + + + email + + + + ${__RandomString(13,abcdefghijklmnopqrstuvwxyz,)}@gmail.com + + + true + + + + 2000 + + + + + + diff --git a/jmeter-plugin-install.sh b/jmeter-plugin-install.sh index 9a4c8de..187c6cb 100644 --- a/jmeter-plugin-install.sh +++ b/jmeter-plugin-install.sh @@ -12,11 +12,11 @@ echo "Downloading Plugin Manager" curl -L https://jmeter-plugins.org/get/ --output ${JMETER_HOME}/lib/ext/jmeter-plugins-manager-${JMETER_PLUGIN_MANAGER_VERSION}.jar # Install Plugin Manager -java -cp /opt/apache/apache-jmeter-${JMETER_VERSION}/lib/ext/jmeter-plugins-manager-${JMETER_PLUGIN_MANAGER_VERSION}.jar org.jmeterplugins.repository.PluginManagerCMDInstaller +java -cp ${JMETER_HOME}/lib/ext/jmeter-plugins-manager-${JMETER_PLUGIN_MANAGER_VERSION}.jar org.jmeterplugins.repository.PluginManagerCMDInstaller # Install JMeter plugins -cd /opt/apache/apache-jmeter-${JMETER_VERSION}/bin/ +cd ${JMETER_HOME}/bin/ java -jar ${JMETER_HOME}/lib/cmdrunner-${JMETER_CMD_RUNNER_VERSION}.jar --tool org.jmeterplugins.repository.PluginManagerCMD install ${JMETER_PLUGIN_INSTALL_LIST} # Set execute permissions for JMeter shell scripts -chmod a+x ${JMETER_HOME}/bin/*.sh \ No newline at end of file +chmod a+x ${JMETER_HOME}/bin/*.sh