Commit a594550a authored by jiang feng's avatar jiang feng
Browse files

Merge branch 'branch1' into 'main'

Branch1

See merge request !1
parents a19d8b51 8aa83330
Pipeline #1329 passed with stage
in 33 seconds
# test_project_1 # test_project_1
# test_project_1
# 默认忽略的文件
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="16" project-jdk-type="JavaSDK" />
</project>
\ No newline at end of file
codecov:
notify:
require_ci_to_pass: yes
coverage:
precision: 2
round: down
range: "51...75"
status:
project: yes
patch: yes
changes: no
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
comment:
layout: "reach, diff, flags, files, footer"
behavior: default
require_changes: no
root = true
[*]
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
indent_style = space
max_line_length = 120
[{*.sh,gradlew}]
end_of_line = lf
[{*.bat,*.cmd}]
end_of_line = crlf
[{*.kts,*.kt}]
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL
ij_kotlin_name_count_to_use_star_import = 999
ij_kotlin_name_count_to_use_star_import_for_members = 999
# Kotlin code style does not use double-continuation indents
# Revise this when the following issues are resolved:
# https://youtrack.jetbrains.com/issue/KTIJ-17907
# https://github.com/pinterest/ktlint/issues/805
ij_kotlin_continuation_indent_size = 4
[*.java]
# Doc: https://youtrack.jetbrains.com/issue/IDEA-170643#focus=streamItem-27-3708697.0-0
#"static ", "java.", "javax", "org", "net", "com", ""
ij_java_imports_layout = $*,|,java.**,|,javax.**,|,org.**,|,net.**,|,com.**,|,*
ij_java_use_single_class_imports = true
# Auto detect text files and perform LF normalization
* text=auto
*.java text
*.html text
*.css text
*.js text
*.sql text
*.q text
# Note: executable is a non-standard attribute, and it is used by the release plugin
*.sh text eol=lf executable
*.cgi text eol=lf executable
*.bat text eol=crlf
*.cmd text eol=crlf
# Blow files don't have extension, so we mention them explicitly
/gradlew text eol=lf executable
/bin/jmeter text eol=lf executable
/bin/jmeter-server text eol=lf executable
/bin/mirror-server text eol=lf executable
/xdocs/changes.xml merge=union
/xdocs/changes_history.xml merge=union
name: "Validate Gradle Wrapper"
on: [push, pull_request]
jobs:
validation:
name: "Validation"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
name: CI
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners
concurrency:
# On master/release, we don't want any jobs cancelled so the sha is used to name the group
# On PR branches, we cancel the job if new commits are pushed
# More info: https://stackoverflow.com/a/68422069/253468
group: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release' ) && format('ci-main-{0}', github.sha) || format('ci-main-{0}', github.ref) }}
cancel-in-progress: true
jobs:
windows:
name: 'Windows (JDK 17)'
runs-on: windows-latest
steps:
- uses: actions/checkout@v1.1.0
with:
fetch-depth: 50
- name: 'Set up JDK 17'
uses: actions/setup-java@v1
with:
java-version: 17
- uses: burrunan/gradle-cache-action@v1
name: Test
with:
job-id: jdk17
multi-cache-enabled: false
# An explicit skip for Sha512 tasks is required due to https://github.com/gradle/gradle/issues/16789
arguments: --scan --no-parallel build -x distTar -x distTarSource -x distTarSha512 -x distTarSourceSha512
mac:
name: 'macOS (JDK 17)'
runs-on: macos-latest
steps:
- uses: actions/checkout@v1.1.0
with:
fetch-depth: 50
- name: 'Set up JDK 17'
uses: actions/setup-java@v1
with:
java-version: 17
- uses: burrunan/gradle-cache-action@v1
name: Test
with:
job-id: jdk14
multi-cache-enabled: false
arguments: --scan --no-parallel build -x distTar -x distTarSource -x distTarSha512 -x distTarSourceSha512 -Dskip.test_TestDNSCacheManager.testWithCustomResolverAnd1Server=true
errorprone:
name: 'Error Prone (JDK 11)'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 50
- name: 'Set up JDK 11'
uses: actions/setup-java@v1
with:
java-version: 11
- uses: burrunan/gradle-cache-action@v1
name: Test
with:
job-id: errprone
multi-cache-enabled: false
arguments: --scan --no-parallel --no-daemon -PenableErrorprone classes
# Directory trees to ignore
/backups/
/build/
/buildSrc/build/
/buildSrc/subprojects/*/build/
/buildSrc/subprojects/*/bin/
/buildSrc/subprojects/*/out/
/src/build/
/src/bin/
/src/out/
/src/*/build/
/src/*/bin/
/src/*/out/
/src/protocol/*/build/
/src/protocol/*/bin/
/src/protocol/*/out/
/dist/
/docs/
/local/
/printable_docs/
/reports/
/site/
/target/
!/bin/report-template/**/dist
/bin/temp/
/bin/testfiles/testReport*
# Ignore Gradle project-specific cache directory
.gradle
# macOS
.DS_Store
# specific files to ignore
*.log
.ant-targets-build.xml
.checkstyle
.classpath
.externalToolBuilders
.fbwarnings
.fbprefs
.pmd
.project
.settings
# bin/ folder is used to launch JMeter, so we ignore certain files there
/bin/ApacheJMeter.jar
# Below are the results of "batch test" execution
/bin/*.csv
/bin/*.jmx
/bin/*.jtl
/bin/*.xml
# We need log4j2.xml and tika-config.xml even though we want to exclude xml created by batch tests
!/bin/log4j2.xml
!/bin/tika-config.xml
build-local.properties
jmeter-fb.*
# ignore generated keystore and certs
/bin/proxyserver.jks
/bin/ApacheJMeterTemporaryRootCA.crt
/bin/ApacheJMeterTemporaryRootCA.usr
# ignore jar's in lib/
/lib/**/*.jar
# ignore default report output directory
/bin/report-output
/output/
# IDEA
/out/
.idea/*
!/.idea/icon.png
*.iml
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# other jvm related files
.attach_*
checksum.xml
buildSrc/checksum.xml
gradle/wrapper/gradle-wrapper.jar
.*
.*/**
CODE_OF_CONDUCT.md
CONTRIBUTING.md
eclipse.md
gradle.md
ISSUE_TEMPLATE.md
PULL_REQUEST_TEMPLATE.md
README.md
**/*.jmx
bin/examples/**
bin/report-output/**
bin/report-template/**
bin/testfiles/**
build-local.properties
extras/*.txt
extras/*.json
extras/Test.html
extras/Test.jtl
**/images/**
lib/aareadme.txt
lib/opt/README.txt
src/licenses/licenses/*/CC0-1.0.txt
#local/**
#printable_docs/**
#reports/**
src/launcher/src/main/resources/org/apache/jmeter/jmeter_as_ascii_art.txt
src/core/src/main/resources/org/apache/jmeter/help.txt
src/dist/src/dist/expected_release_jars.csv
test/resources/**
**/test/resources/**
#**/*.log
**/download_jmeter.cgi
xdocs/extending/HTML_REPORT_README.TXT
# Rat should automatically detect below files as binary, however it fails
**/*.sxi
**/*.sxw
language: java
# skip default "install" command
install: true
# We can clean the caches via web at https://travis-ci.org/apache/jmeter/caches
before_cache:
- F=CleanupGradleCache sh -x -c 'curl -O https://raw.githubusercontent.com/vlsi/cleanup-gradle-cache/v1.x/$F.java && javac -J-Xmx128m $F.java && java -Xmx128m $F'
- rm -rf $HOME/.m2/repository/org/apache/jmeter
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.m2/repository
env:
global:
- SKIP_TAR="-x distTar -x distTarSource -x distTarSha512 -x distTarSourceSha512"
- ORG_GRADLE_PROJECT_checksumFailOn=build_finish
- ORG_GRADLE_PROJECT_checksumPrint=true
matrix:
allow_failures:
# j-m-p does not seem to download all the dependencies: https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/issues/187
- name: jmeter-maven-plugin tests
- name: jmeter-maven-plugin tests on s390x
- name: Tests with OpenJDK 11 on s390x
include:
- name: Tests with OpenJDK 8 + code coverage
jdk: openjdk8
script:
- xvfb-run ./gradlew build jacocoReport $SKIP_TAR
after_success:
- bash <(curl -s https://codecov.io/bash)
- name: Tests with OpenJDK 11
jdk: openjdk11
addons:
apt:
packages:
- language-pack-fr
env:
- TZ=Pacific/Chatham # flips between +12:45 and +13:45
- LANG=fr_FR.UTF-8
- LC_ALL=fr_FR.UTF-8
script:
# This job verifies headless mode to ensure Apache JMeter is workable in headless as well
# Spotless and Checkstyle are skipped here to save some time. They are verified anyway in Java 8 and Java 13 builds, so skipping them for Java 11 does not harm
- ./gradlew build -Djava.awt.headless=true -Duser.language=fr -Duser.country=FR -PskipCheckstyle -PskipSpotless $SKIP_TAR
- name: Tests with OpenJDK 11 and Java Regex
jdk: openjdk11
addons:
apt:
packages:
- language-pack-fr
env:
- TZ=Pacific/Chatham # flips between +12:45 and +13:45
- LANG=fr_FR.UTF-8
- LC_ALL=fr_FR.UTF-8
script:
# This job verifies headless mode to ensure Apache JMeter is workable in headless as well
# Spotless and Checkstyle are skipped here to save some time. They are verified anyway in Java 8 and Java 13 builds, so skipping them for Java 11 does not harm
- ./gradlew build -Djava.awt.headless=true -Djmeter.properties.jmeter.regex.engine=java -Duser.language=fr -Duser.country=FR -PskipCheckstyle -PskipSpotless $SKIP_TAR
- name: Tests with OpenJDK 11 on s390x
os: linux
arch: s390x
dist: bionic
jdk: openjdk11
addons:
apt:
packages:
- language-pack-fr
script:
- sudo apt-get install -y openjdk-11-jdk
- export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-s390x/
- export PATH=$JAVA_HOME/bin:$PATH
- ./gradlew build -Djava.awt.headless=true -PskipCheckstyle -PskipSpotless $SKIP_TAR
# We test with so-called LTS releases: 8, 11, 17
- name: Tests with OpenJDK 17
jdk: openjdk17
addons:
apt:
packages:
- language-pack-fr
env:
- TZ=America/New_York # flips between −05:00 and −04:00
- LANG=fr_FR.UTF-8
- LC_ALL=fr_FR.UTF-8
script:
# Spotless, Checkstyle, and JaCoCo are verified here to ensure they all work with the latest supported Java
- xvfb-run ./gradlew build jacocoReport -Duser.language=fr -Duser.country=FR $SKIP_TAR
- name: jmeter-maven-plugin tests
jdk: openjdk8
script:
- ./gradlew -PskipJavadoc publishToMavenLocal -Pjmeter.version=42.0 -PchecksumIgnore
- cd ..
- git clone --depth 100 https://github.com/jmeter-maven-plugin/jmeter-maven-plugin.git
- cd jmeter-maven-plugin
- mvn verify -Djmeter.version=42.0-SNAPSHOT
- name: jmeter-maven-plugin tests on s390x
os: linux
arch: s390x
jdk: openjdk11
script:
- wget https://www.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
- tar -xvzf apache-maven-3.6.3-bin.tar.gz
- export PATH=`pwd`/apache-maven-3.6.3/bin/:$PATH
- ./gradlew -PskipJavadoc publishToMavenLocal -Pjmeter.version=42.0 -PchecksumIgnore
- cd ..
- git clone --depth 100 https://github.com/jmeter-maven-plugin/jmeter-maven-plugin.git
- cd jmeter-maven-plugin
- mvn verify -Djmeter.version=42.0-SNAPSHOT
# Code of Conduct
## Introduction
This code of conduct applies to all spaces managed by the Apache Software Foundation, including IRC, all public and private mailing lists, issue trackers, wikis, blogs, Twitter, and any other communication channel used by our communities. A code of conduct which is specific to in-person events (ie., conferences) is codified in the published ASF anti-harassment policy.
We expect this code of conduct to be honored by everyone who participates in the Apache community formally or informally, or claims any affiliation with the Foundation, in any Foundation-related activities and especially when representing the ASF, in any role.
This code is not exhaustive or complete. It serves to distill our common understanding of a collaborative, shared environment and goals. We expect it to be followed in spirit as much as in the letter, so that it can enrich all of us and the technical communities in which we participate.
# Specific Guidelines
We strive to:
## **Be open**
we invite anyone to participate in our community. We preferably use public methods of communication for project-related messages, unless discussing something sensitive. This applies to messages for help or project-related support, too; not only is a public support request much more likely to result in an answer to a question, it also makes sure that any inadvertent mistakes made by people answering will be more easily detected and corrected.
## **Be empathetic**
welcoming, friendly, and patient. We work together to resolve conflict, assume good intentions, and do our best to act in an empathetic fashion. We may all experience some frustration from time to time, but we do not allow frustration to turn into a personal attack. A community where people feel uncomfortable or threatened is not a productive one. We should be respectful when dealing with other community members as well as with people outside our community.
## **Be collaborative**,
our work will be used by other people, and in turn we will depend on the work of others. When we make something for the benefit of the project, we are willing to explain to others how it works, so that they can build on the work to make it even better. Any decision we make will affect users and colleagues, and we take those consequences seriously when making decisions.
## **Be inquisitive**,
nobody knows everything! Asking questions early avoids many problems later, so questions are encouraged, though they may be directed to the appropriate forum. Those who are asked should be responsive and helpful, within the context of our shared goal of improving Apache project code.
## **Be careful in the words that we choose**,
Whether we are participating as professionals or volunteers, we value professionalism in all interactions, and take responsibility for our own speech. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behaviour are not acceptable. This includes, but is not limited to:
* Violent threats or language directed against another person.
* Sexist, racist, or otherwise discriminatory jokes and language.
* Posting sexually explicit or violent material.
* Posting (or threatening to post) other people's personally identifying information ("doxing").
* Sharing private content, such as emails sent privately or non-publicly, or unlogged forums such as IRC channel history.
* Personal insults, especially those using racist or sexist terms.
* Unwelcome sexual attention.
* Excessive or unnecessary profanity.
* Repeated harassment of others. In general, if someone asks you to stop, then stop.
* Advocating for, or encouraging, any of the above behaviour.
## **Be concise**,
keep in mind that what you write once will be read by hundreds of persons. Writing a short email means people can understand the conversation as efficiently as possible. Short emails should always strive to be empathetic, welcoming, friendly and patient. When a long explanation is necessary, consider adding a summary.
Try to bring new ideas to a conversation so that each mail adds something unique to the thread, keeping in mind that the rest of the thread still contains the other messages with arguments that have already been made.
Try to stay on topic, especially in discussions that are already fairly large.
## **Step down considerately**,
members of every project come and go. When somebody leaves or disengages from the project they should tell people they are leaving and take the proper steps to ensure that others can pick up where they left off. In doing so, they should remain respectful of those who continue to participate in the project and should not misrepresent the project's goals or achievements. Likewise, community members should respect any individual's choice to leave the project.
# Diversity Statement
Apache welcomes and encourages participation by everyone. We are committed to being a community that everyone feels good about joining. Although we may not be able to satisfy everyone, we will always work to treat everyone well.
No matter how you identify yourself or how others perceive you: we welcome you. Though no list can hope to be comprehensive, we explicitly honour diversity in: age, culture, ethnicity, genotype, gender identity or expression, language, national origin, neurotype, phenotype, political beliefs, profession, race, religion, sexual orientation, socioeconomic status, subculture and technical ability.
Though we welcome people fluent in all languages, Apache development is conducted in English.
Standards for behaviour in the Apache community are detailed in the Code of Conduct above. We expect participants in our community to meet these standards in all their interactions and to help others to do so as well.
# Reporting Guidelines
While this code of conduct should be adhered to by participants, we recognize that sometimes people may have a bad day, or be unaware of some of the guidelines in this code of conduct. When that happens, you may reply to them and point out this code of conduct. Such messages may be in public or in private, whatever is most appropriate. However, regardless of whether the message is public or not, it should still adhere to the relevant parts of this code of conduct; in particular, it should not be abusive or disrespectful.
If you believe someone is violating this code of conduct, you may reply to them and point out this code of conduct. Such messages may be in public or in private, whatever is most appropriate. Assume good faith; it is more likely that participants are unaware of their bad behaviour than that they intentionally try to degrade the quality of the discussion. Should there be difficulties in dealing with the situation, you may report your compliance issues in confidence to either:
* President of the Apache Software Foundation: Sam Ruby (rubys at intertwingly dot net)
or one of our volunteers:
* Mark Thomas
* Joan Touzet
* Sharan Foga
If the violation is in documentation or code, for example inappropriate pronoun usage or word choice within official documentation, we ask that people report these privately to the project in question at private@project.apache.org, and, if they have sufficient ability within the project, to resolve or remove the concerning material, being mindful of the perspective of the person originally reporting the issue.
# Endnotes
This Code defines empathy as "a vicarious participation in the emotions, ideas, or opinions of others; the ability to imagine oneself in the condition or predicament of another." Empathetic is the adjectival form of empathy.
# How to contribute
Want to show Apache JMeter some love? Help out by contributing!
## :beetle: Found a bug
Log it in our bugzilla:
* *<https://jmeter.apache.org/issues.html>*
* or send a note to the *user mailing list*.
Be sure to include all relevant information, like the versions of JMeter you’re using as long as Java version.
A Test plan that caused the issue as well as any error messages are also very helpful.
## :question: Need help
Simply contact:
* [Our users mailing list](https://jmeter.apache.org/mail2.html#JMeterUser)
* or ask question on [stackoverflow](https://stackoverflow.com/questions/tagged/jmeter).
## :bar_chart: What needs to be developed
See:
* [Open bug entries for JMeter](https://bz.apache.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=NEEDINFO&bug_severity=Blocker&bug_severity=Critical&bug_severity=Major&bug_severity=Normal&bug_severity=Regression&bug_severity=Minor&bug_severity=Trivial&product=JMeter&order=Bug%20Number&list_id=164231)
* [Enhancement requests for JMeter](https://bz.apache.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=NEEDINFO&bug_severity=Enhancement&product=JMeter&order=Bug%20Number&list_id=164232)
## Development setup
### Gradle
You might find useful Gradle commands in [gradle.md](gradle.md)
### <a name="intellij"></a>IntelliJ IDEA
You require IntelliJ 2018.3.1 or newer.
1. Open the build.gradle.kts file with IntelliJ IDEA and choose `Open as Project`
1. Make sure `Create separate module per source set` is selected
1. Make sure `Use default gradle wrapper` is selected
1. In the `File already exists` dialogue, choose `Yes` to overwrite
1. In the `Open Project` dialogue, choose `Delete Existing Project and Import`
### Eclipse
Eclipse can import Gradle projects automatically via `Import...->Gradle project` wizard.
Optionally you can generate an Eclipse project by running
./gradlew eclipse
The steps to import the sources (based on Eclipse 2019-06) into Eclipse are as follows:
1. Install `Eclipse IDE for Java Developers`
1. Install the Groovy Eclipse plugin and select Groovy Compiler 2.4 (some tests are written in Groovy)
1. Install `Kotlin for Eclipse` plugin (builds scripts are written in Kotlin)
1. Make sure you have a Java 8 compatible JDK configured in your workspace
1. Open `File->Import...`
1. Select `Existing Gradle Project` and click `Next`
1. Read `How to experience the best Gradle integration` and click `Next`
1. Then you might just click `Finish`
## :star2: Have a patch
The best way to make sure your issue or feature is addressed is to submit a patch.
We accept patches through:
* pull requests
* patch attached to bugzilla.
However, before sending a patch, please make sure that the following applies:
* Your commit message is descriptive.
* Your patch doesn't have useless merge commits.
* Your coding style is similar to ours.
* Your patch is 100% tested. JUnit are welcome.
* All tests checks pass (run `./gradlew check`)
* You understand that we're very grateful for your patch!
## :heart: Adding something new
We do love to enhance Apache JMeter with you to become more powerful!
The best way to work out your idea is to discuss it first at our dev mailing list:
* [JMeter developers mailing list](https://jmeter.apache.org/mail2.html#JMeterDev)
Please, if you can, don't just throw us the code of a new feature; lets figure first together
what would be the best approach regarding the current architecture and future plans,
before any development.
This way we all get sure that your idea is aligned with the codebase, and you can enjoy
your happy coding even more :)
## :closed_book: Want to write docs
Documentation is very valuable to us.
It is located in **[xdocs](xdocs)** folder in XML format.
You can contribute as you would for code through patch or *PR* (pull request).
# Reporting an issue:
- Mention JVM implementation (OpenJDK, Oracle JDK, ...), versions of Java, Apache JMeter
- Provide anonymized and as simple as possible test plan helping reproduce the issue
- Provide jmeter.log
- If it's a bug, explain clearly how to reproduce:
- What should happen (OK Case)
- What happens (KO Case)
- If it's an enhancement request, explain what you want, why you need it and the clear use case
- Answer to questions of the person who handles your case
Issue are related to bug or enhancements, it is not the right place to ask questions about usage, for the latter:
- Read the [User manual](https://jmeter.apache.org/usermanual/index.html) and/or [Reference documentation](https://jmeter.apache.org/usermanual/component_reference.html)
- Ask questions on the [user mailing list](https://jmeter.apache.org/mail2.html). *Note you need to subscribe first*
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Additional License files can be found in the 'licenses' folder located in the same directory as the LICENSE file (i.e. this file)
- Software produced outside the ASF which is available under Apache-2.0
Apache-2.0
* org.gradle:gradle-wrapper:7.3
* start-bootstrap-admin2:start-bootstrap-admin2:1.0.7
- Software produced outside the ASF which is available under other licenses (not Apache-2.0)
CC-BY-SA-3.0
* openiconlibrary:openiconlibrary:
MIT
* bootstrap-social:bootstrap-social:4.8.0
* bootstrap:bootstrap:3.3.4
* datatables-plugins:datatables-plugins:1.0.1
* datatables-responsive:datatables-responsive:1.0.5
* datatables:datatables:1.10.9
* flot-axislabels:flot-axislabels:0.8.3
* flot.tooltip:flot.tooltip:0.8.4
* flot:flot:0.8.3
* font-awesome-code:font-awesome-code:4.2.0
* jquery:jquery:2.1.3
* metisMenu:metisMenu:1.1.3
OFL-1.1
* font-awesome-font:font-awesome-font:4.2.0
Apache JMeter
Copyright 1998-2022 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
## Description
<!--- Provide a general summary of your changes in the Title above -->
<!--- Describe your changes in detail here -->
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, tests ran to see how -->
<!--- your change affects other areas of the code, etc. -->
## Screenshots (if appropriate):
## Types of changes
<!--- What types of changes does your code introduce? Delete as appropriate -->
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to not work as expected)
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the [code style][style-guide] of this project.
- [ ] I have updated the documentation accordingly.
[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines
<h1 align="center"><img src="https://jmeter.apache.org/images/logo.svg" alt="Apache JMeter logo" /></h1>
An Open Source Java application designed to measure performance and load test applications.
By The Apache Software Foundation
[![Build Status](https://api.travis-ci.com/apache/jmeter.svg?branch=master)](https://travis-ci.com/apache/jmeter/)
[![codecov](https://codecov.io/gh/apache/jmeter/branch/master/graph/badge.svg)](https://codecov.io/gh/apache/jmeter)
[![License](https://img.shields.io/:license-apache-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![Stack Overflow](https://img.shields.io/:stack%20overflow-jmeter-brightgreen.svg)](https://stackoverflow.com/questions/tagged/jmeter)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.jmeter/ApacheJMeter/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.jmeter/ApacheJMeter)
[![Javadocs](https://www.javadoc.io/badge/org.apache.jmeter/ApacheJMeter_core.svg)](https://www.javadoc.io/doc/org.apache.jmeter/ApacheJMeter_core)
[![Twitter](https://img.shields.io/twitter/url/https/github.com/apache/jmeter.svg?style=social)](https://twitter.com/intent/tweet?text=Powerful%20load%20testing%20with%20Apache%20JMeter:&url=https://jmeter.apache.org)
## What Is It?
Apache JMeter can measure performance and load test static and dynamic web applications.
It can be used to simulate a heavy load on a server, group of servers,
network or object to test its strength or to analyze overall performance under different load types.
![JMeter screen](https://raw.githubusercontent.com/apache/jmeter/master/xdocs/images/screenshots/jmeter_screen.png)
## Features
Complete portability and 100% Java.
Multi-threading allows concurrent sampling by many threads and
simultaneous sampling of different functions by separate thread groups.
### Protocols
Ability to load and performance test many applications/server/protocol types:
- Web - HTTP, HTTPS (Java, NodeJS, PHP, ASP.NET,...)
- SOAP / REST Webservices
- FTP
- Database via JDBC
- LDAP
- Message-oriented Middleware (MOM) via JMS
- Mail - SMTP(S), POP3(S) and IMAP(S)
- Native commands or shell scripts
- TCP
- Java Objects
### IDE
Fully featured Test IDE that allows fast Test Plan **recording**
(from Browsers or native applications), **building** and **debugging**.
### Command Line
[Command-line mode (Non GUI / headless mode)](https://jmeter.apache.org/usermanual/get-started.html#non_gui)
to load test from any Java compatible OS (Linux, Windows, Mac OSX, ...)
### Reporting
A complete and ready to present [dynamic HTML report](https://jmeter.apache.org/usermanual/generating-dashboard.html)
![Dashboard screenshot](https://raw.githubusercontent.com/apache/jmeter/master/xdocs/images/screenshots/dashboard/response_time_percentiles_over_time.png)
[Live reporting](https://jmeter.apache.org/usermanual/realtime-results.html)
into 3rd party databases like InfluxDB or Graphite
![Live report](https://raw.githubusercontent.com/apache/jmeter/master/xdocs/images/screenshots/grafana_dashboard.png)
### Correlation
Easy correlation through ability to extract data from most popular response formats,
[HTML](https://jmeter.apache.org/usermanual/component_reference.html#CSS/JQuery_Extractor),
[JSON](https://jmeter.apache.org/usermanual/component_reference.html#JSON_Extractor),
[XML](https://jmeter.apache.org/usermanual/component_reference.html#XPath_Extractor) or
[any textual format](https://jmeter.apache.org/usermanual/component_reference.html#Regular_Expression_Extractor)
### Highly Extensible Core
- Pluggable Samplers allow unlimited testing capabilities.
- **Scriptable Samplers** (JSR223-compatible languages like Groovy).
- Several load statistics can be chosen with **pluggable tiers**.
- Data analysis and **visualization plugins** allow great extensibility and personalization.
- Functions can be used to provide dynamic input to a test or provide data manipulation.
- Easy Continuous Integration via 3rd party Open Source libraries for Maven, Gradle and Jenkins.
## The Latest Version
Details of the latest version can be found on the
[JMeter Apache Project web site](https://jmeter.apache.org/)
## Requirements
The following requirements exist for running Apache JMeter:
- Java Interpreter:
A fully compliant Java 8 Runtime Environment is required
for Apache JMeter to execute. A JDK with `keytool` utility is better suited
for Recording HTTPS websites.
- Optional jars:
Some jars are not included with JMeter.
If required, these should be downloaded and placed in the lib directory
- JDBC - available from the database supplier
- JMS - available from the JMS provider
- [Bouncy Castle](https://www.bouncycastle.org/) -
only needed for SMIME Assertion
- Java Compiler (*OPTIONAL*):
A Java compiler is not needed since the distribution includes a
precompiled Java binary archive.
> **Note** that a compiler is required to build plugins for Apache JMeter.
## Installation Instructions
> **Note** that spaces in directory names can cause problems.
- Release builds
Unpack the binary archive into a suitable directory structure.
## Running JMeter
1. Change to the `bin` directory
2. Run the `jmeter` (Un\*x) or `jmeter.bat` (Windows) file.
### Windows
For Windows, there are also some other scripts which you can drag-and-drop
a JMX file onto:
- `jmeter-n.cmd` - runs the file as a non-GUI test
- `jmeter-n-r.cmd` - runs the file as a non-GUI remote (client-server) test
- `jmeter-t.cmd` - loads the file ready to run it as a GUI test
## Documentation
The documentation available as of the date of this release is
also included, in HTML format, in the [printable_docs](printable_docs) directory,
and it may be browsed starting from the file called [index.html](printable_docs/index.html).
## Reporting a bug/enhancement
See [Issue Tracking](https://jmeter.apache.org/issues.html).
## Build instructions
### Release builds
Unpack the source archive into a suitable directory structure.
Most of the 3rd party library files can be extracted from the binary archive
by unpacking it into the same directory structure.
Any optional jars (see above) should be placed in `lib/opt` and/or `lib`.
Jars in `lib/opt` will be used for building JMeter and running the unit tests,
but won't be used at run-time.
_This is useful for testing what happens if the optional jars are not
downloaded by other JMeter users._
If you are behind a proxy, you can set a few build properties in
`~/.gradle/gradle.properties` for Gradle to use the proxy:
```properties
systemProp.http.proxyHost=proxy.example.invalid
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=your_user_name
systemProp.http.proxyPassword=your_password
systemProp.https.proxyHost=proxy.example.invalid
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=your_user_name
systemProp.https.proxyPassword=your_password
```
### Test builds
JMeter is built using Gradle.
The following command builds and tests JMeter:
```sh
./gradlew build
```
If the system does not have a GUI display then:
```sh
./gradlew build -Djava.awt.headless=true
```
The output artifacts (jars, reports) are placed in the `build` folder.
For instance, binary artifacts can be found under `src/dist/build/distributions`.
The following command would compile the application and enable you to run `jmeter`
from the `bin` directory.
> **Note** that it completely refreshes `lib/` contents,
so it would remove custom plugins should you have them installed.
```sh
./gradlew createDist
```
Alternatively, you could get Gradle to start the GUI:
```sh
./gradlew runGui
```
## Developer Information
Building and contributing is explained in details at
[building JMeter](https://jmeter.apache.org/building.html)
and [CONTRIBUTING.md](CONTRIBUTING.md). More information on the tasks available for
building JMeter with Gradle is available in [gradle.md](gradle.md).
The code can be obtained from:
- https://github.com/apache/jmeter
- https://gitbox.apache.org/repos/asf/jmeter.git
## Licensing and Legal Information
For legal and licensing information, please see the following files:
- [LICENSE](LICENSE)
- [NOTICE](NOTICE)
## Cryptographic Software Notice
This distribution may include software that has been designed for use
with cryptographic software. The country in which you currently reside
may have restrictions on the import, possession, use, and/or re-export
to another country, of encryption software. BEFORE using any encryption
software, please check your country's laws, regulations and policies
concerning the import, possession, or use, and re-export of encryption
software, to see if this is permitted. See <https://www.wassenaar.org/>
for more information.
The U.S. Government Department of Commerce, Bureau of Industry and
Security (BIS), has classified this software as Export Commodity
Control Number (ECCN) 5D002.C.1, which includes information security
software using or performing cryptographic functions with asymmetric
algorithms. The form and manner of this Apache Software Foundation
distribution makes it eligible for export under the License Exception
ENC Technology Software Unrestricted (TSU) exception (see the BIS
Export Administration Regulations, Section 740.13) for both object
code and source code.
The following provides more details on the included software that
may be subject to export controls on cryptographic software:
Apache JMeter interfaces with the
Java Secure Socket Extension (JSSE) API to provide
- HTTPS support
Apache JMeter interfaces (via Apache HttpClient4) with the
Java Cryptography Extension (JCE) API to provide
- NTLM authentication
Apache JMeter does not include any implementation of JSSE or JCE.
## Thanks
**Thank you for using Apache JMeter.**
### Third party notices
* Notice for mxparser:
> This product includes software developed by the Indiana
> University Extreme! Lab. For further information please visit
> http://www.extreme.indiana.edu/
// Sample BeanShell Assertion initialisation file
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
//print("Initialisation started");
import org.apache.jmeter.util.JMeterUtils;
i = j = k = 0; // for counters
getprop(p){// get a JMeter property
return JMeterUtils.getPropDefault(p,"");
}
getprop(p,d){// get a JMeter property with default
return JMeterUtils.getPropDefault(p,d);
}
setprop(p,v){// set a JMeter property
JMeterUtils.setProperty(p, v);
}
// Assertions can use the following methods on the Response object:
// SampleResult.setStopThread(true)
// SampleResult.setStopTest(true)
//print("Initialisation complete");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment