This change enables cleaner separation between "actual tests" and "support classes for the tests".
For instance, `:src:core` might provide dummy samplers like `ThreadSleep` for testing purposes.
`ThreadSleep` would depend on `src/test/main` (since it would `extend AbstractSampler`),
and other modules (e.g. tests in `:src:protocols:http`) might need that `ThreadSleep` sampler.
It won't be practical to create `core-testkit` modules for every module,
so we move those reusable test classes to `testFixtures/...` source set.
See https://docs.gradle.org/current/userguide/java_testing.html#sec:java_test_fixtures
The new variables are
* method - HTTP method of the request
* host - host of the URL recorded (called domain in the sampler)
* scheme - scheme of the URL recorded (called protocol in the sampler)
* port - port of the URL recorded
* url - URL as recorded
Issue #5820
Co-authored-by: Alex Schwartz <alexschwartz01@gmail.com>
Guard message formats that might have been given by user
As Vladimir pointed out, we might have users, that construct
a format string with a part, that might be interpreted by
MessageFormat. So let us guard those.
asdf
Previously it cached the values based on iteration number only
which triggered wrong results on concurrent executions.
The previous behavior can be temporary restored with
function.cache.per.iteration=true property.
ServiceLoader is Java standard approach for locating implementaitons,
and it allows pluggability without relying on a filesystem layout.
Fixes https://github.com/apache/jmeter/issues/5883
The long description in the required field let to a line
break in my browser, where the complete text rendered in
the title column.
We might think about a special default attribute for the
arguments, that could be used to specify a default value.
Closes#5731
Currently the used JEditorPane is slow when using large texts, as it
tries to find good places to break words.
This hack disables word wrapping by using non-wrapping views
for every element in the JEditorPane.
Introduce a new setting view.results.tree.simple_view_limit for view results tree
This setting is used to decide, whether the text view should switch to a simpler
view model. That can help to get rid of UI unresponsiveness on large contents.
Closes#706
GUI gets unresponsive when the response contains long lines (e.g lines exceeding 100K chars).
The workaround is to add artificial line breaks.
We try to break on word boundaries first, and if not possible,
we break on char boundaries (e.g. large chunks of base64 data).
view.results.tree.max_line_size=110000 (defaults to 110K)
view.results.tree.soft_wrap_line_size=100000 (defaults to max_line_size/1.1)
CPU spin trace looks as follows:
"AWT-EventQue...
...
at sun.font.GlyphLayout.layout(Unknown Source)
...
at java.awt.font.TextLine.<init>(Unknown Source)
at java.awt.font.TextMeasurer.makeTextLineOnRange(Unknown Source)
at java.awt.font.TextMeasurer.getLayout(Unknown Source)
...
at javax.swing.text.JTextComponent.setDocument(Unknown Source)
at org.apache.jmeter.visualizers.SamplerResultTab.setTextOptimized(SamplerResultTab.java:695)
...
The docs for JSONPath Assertion state, that it will fail the assertion,
when no element is found with the given JSON path. This was currently
not followed, when an indefinite path was used. In such a case, the
JSONPath library would return an empty list, which the assertion logic
would log as OK.
With this change we let the assertion fail, when
* an indefinite path was given
* and an empty list is extracted
* and no assertion value is given
Bugzilla Id: 65794
The UI for those elements suggest, that the extractors would
look into sub-samples for matches (or even could be configured
to use only values from the sub-samples). Adapt the implementation
to make that assumption true.
Bugzilla Id: 65269