Skip to content

Commit

Permalink
Merge pull request #98 from eldaduzman/Fix-Readme0.5
Browse files Browse the repository at this point in the history
[skip ci] fix badges
  • Loading branch information
eldaduzman authored Nov 19, 2022
2 parents 8285d60 + 17fc1d1 commit 235b48e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Simple JMeter performance tests API for python
![](https://raw.githubusercontent.com/eldaduzman/pymeter/main/docs/badges/pylint.svg)
![](https://raw.githubusercontent.com/eldaduzman/pymeter/main/docs/badges/mutscore.svg)
[![Generic badge](https://img.shields.io/badge/python-3.8|3.9|3.10|3.11-blue.svg)](https://python.org/)
[![Generic badge](https://img.shields.io/badge/JMeterDsl-1.0.1-blue.svg)](https://abstracta.github.io/jmeter-java-dsl/)
[![Generic badge](https://img.shields.io/badge/JMeterDsl-1.3-blue.svg)](https://abstracta.github.io/jmeter-java-dsl/)
[![Documentation Status](https://readthedocs.org/projects/pymeter/badge/?version=latest)](https://pymeter.readthedocs.io/en/latest/?badge=latest)


Expand Down
10 changes: 7 additions & 3 deletions src/pymeter/api/assertions.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
"""
By default, JMeter marks any HTTP request with a fail response code (4xx or 5xx) as failed,
which allows you to easily identify when some request unexpectedly fails.
which allows you to easily identify when some request unexpectedly fails.
But in many cases, this is not enough or desirable, and you need to check for the response body (or some other field) to contain (or not) a certain string.
But in many cases, this is not enough or desirable,
and you need to check for the response body (or some other field) to contain (or not) a certain string.
This is usually accomplished in JMeter with the usage of Response Assertions, which provides an easy and fast way to verify that you get the proper response for each step of the test plan, marking the request as a failure when the specified condition is not met.
This is usually accomplished in JMeter with the usage of Response Assertions,
which provides an easy and fast way to verify that you get the proper response for each step of the test plan,
marking the request as a failure when the specified condition is not met.
example - 1:
--------------
In this example we assert that the response contains the text "var"
.. code-block:: python
from pymeter.api.config import TestPlan, ThreadGroupSimple
from pymeter.api.samplers import HttpSampler
from pymeter.api.timers import ConstantTimer
Expand Down
2 changes: 1 addition & 1 deletion src/pymeter/api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def tearDownClass(cls):
We can also set a single variable using the `set` method
.. code-block:: python
from pymeter.api.config import Vars
jmeter_variables = Vars(id1="value1", id2="value2")
jmeter_variables.set("id1", "v2")
Expand Down

0 comments on commit 235b48e

Please sign in to comment.