admin管理员组

文章数量:1279113

I need to integrate jmeter with gitlab repository that has a java springboot application code in same branch. In such a way like i need jmeter report to be generated for every time when merge request to develop branch.

I used the justb4/jmeter:latest docker image for the stage. The pipeline is showing error like no files to be uploaded -c option is not supported. Can you please guide me with this? This is my detailed log of pipeline doc

$ git remote set-url origin "${CI_REPOSITORY_URL}"
Executing "step_script" stage of the job script
00:02
Using docker image sha256:f18ea11e303c93e04d7c8dec9c97d603e91a7d712a946575f65f25c354147d2a for justb4/jmeter:latest with digest justb4/jmeter@sha256:088ac52b759a198a5afa5ae13d0a6306e9f2017d71ad140ff57427f6930406f7 ...
START Running Jmeter on Mon Feb 24 10:25:00 CET 2025
JVM_ARGS=-Xmn1496m -Xms5984m -Xmx5984m
jmeter args=sh -c if [ -x /usr/local/bin/bash ]; then
    exec /usr/local/bin/bash 
elif [ -x /usr/bin/bash ]; then
    exec /usr/bin/bash 
elif [ -x /bin/bash ]; then
    exec /bin/bash 
elif [ -x /usr/local/bin/sh ]; then
    exec /usr/local/bin/sh 
elif [ -x /usr/bin/sh ]; then
    exec /usr/bin/sh 
elif [ -x /bin/sh ]; then
    exec /bin/sh 
elif [ -x /busybox/sh ]; then
    exec /busybox/sh 
else
    echo shell not found
    exit 1
fi
jmeter ALL ARGS=-Dlog4j2.formatMsgNoLookups=true sh -c if [ -x /usr/local/bin/bash ]; then
    exec /usr/local/bin/bash 
elif [ -x /usr/bin/bash ]; then
    exec /usr/bin/bash 
elif [ -x /bin/bash ]; then
    exec /bin/bash 
elif [ -x /usr/local/bin/sh ]; then
    exec /usr/local/bin/sh 
elif [ -x /usr/bin/sh ]; then
    exec /usr/bin/sh 
elif [ -x /bin/sh ]; then
    exec /bin/sh 
elif [ -x /busybox/sh ]; then
    exec /busybox/sh 
else
    echo shell not found
    exit 1
fi
UsageError: Unknown option -c
    --?
        print command line options and exit
    -h, --help
        print usage information and exit
    -v, --version
        print the version information and exit
    -p, --propfile <argument>
        the jmeter property file to use
    -q, --addprop <argument>
        additional JMeter property file(s)
    -t, --testfile <argument>
        the jmeter test(.jmx) file to run. "-t LAST" will load last 
        used file
    -l, --logfile <argument>
        the file to log samples to
    -i, --jmeterlogconf <argument>
        jmeter logging configuration file (log4j2.xml)
    -j, --jmeterlogfile <argument>
        jmeter run log file (jmeter.log)
    -n, --nongui
        run JMeter in nongui mode
    -s, --server
        run the JMeter server
    -E, --proxyScheme <argument>
        Set a proxy scheme to use for the proxy server
    -H, --proxyHost <argument>
        Set a proxy server for JMeter to use
    -P, --proxyPort <argument>
        Set proxy server port for JMeter to use
    -N, --nonProxyHosts <argument>
        Set nonproxy host list (e.g. *.apache|localhost)
    -u, --username <argument>
        Set username for proxy server that JMeter is to use
    -a, --password <argument>
        Set password for proxy server that JMeter is to use
    -J, --jmeterproperty <argument>=<value>
        Define additional JMeter properties
    -G, --globalproperty <argument>=<value>
        Define Global properties (sent to servers)
        e.g. -Gport=123
         or -Gglobal.properties
    -D, --systemproperty <argument>=<value>
        Define additional system properties
    -S, --systemPropertyFile <argument>
        additional system property file(s)
    -f, --forceDeleteResultFile
        force delete existing results files and web report folder if
         present before starting the test
    -L, --loglevel <argument>=<value>
        [category=]level e.g. jorphan=INFO, jmeter.util=DEBUG or com
        .example.foo=WARN
    -r, --runremote
        Start remote servers (as defined in remote_hosts)
    -R, --remotestart <argument>
        Start these remote servers (overrides remote_hosts)
    -d, --homedir <argument>
        the jmeter home directory to use
    -X, --remoteexit
        Exit the remote servers at end of test (non-GUI)
    -g, --reportonly <argument>
        generate report dashboard only, from a test results file
    -e, --reportatendofloadtests
        generate report dashboard after load test
    -o, --reportoutputfolder <argument>
        output folder for report dashboard
Error: Unknown option -c
END Running Jmeter on Mon Feb 24 10:25:01 CET 2025
Uploading artifacts for successful job
00:00
Uploading artifacts...
WARNING: report/: no matching files. Ensure that the artifact path is relative to the working directory (/builds/merco_ecosystem/ms_md_master) 
ERROR: No files to upload                          
Cleaning up project directory and file based variables
00:01
Job succeeded

?

I need to integrate jmeter with gitlab repository that has a java springboot application code in same branch. In such a way like i need jmeter report to be generated for every time when merge request to develop branch.

I used the justb4/jmeter:latest docker image for the stage. The pipeline is showing error like no files to be uploaded -c option is not supported. Can you please guide me with this? This is my detailed log of pipeline doc

$ git remote set-url origin "${CI_REPOSITORY_URL}"
Executing "step_script" stage of the job script
00:02
Using docker image sha256:f18ea11e303c93e04d7c8dec9c97d603e91a7d712a946575f65f25c354147d2a for justb4/jmeter:latest with digest justb4/jmeter@sha256:088ac52b759a198a5afa5ae13d0a6306e9f2017d71ad140ff57427f6930406f7 ...
START Running Jmeter on Mon Feb 24 10:25:00 CET 2025
JVM_ARGS=-Xmn1496m -Xms5984m -Xmx5984m
jmeter args=sh -c if [ -x /usr/local/bin/bash ]; then
    exec /usr/local/bin/bash 
elif [ -x /usr/bin/bash ]; then
    exec /usr/bin/bash 
elif [ -x /bin/bash ]; then
    exec /bin/bash 
elif [ -x /usr/local/bin/sh ]; then
    exec /usr/local/bin/sh 
elif [ -x /usr/bin/sh ]; then
    exec /usr/bin/sh 
elif [ -x /bin/sh ]; then
    exec /bin/sh 
elif [ -x /busybox/sh ]; then
    exec /busybox/sh 
else
    echo shell not found
    exit 1
fi
jmeter ALL ARGS=-Dlog4j2.formatMsgNoLookups=true sh -c if [ -x /usr/local/bin/bash ]; then
    exec /usr/local/bin/bash 
elif [ -x /usr/bin/bash ]; then
    exec /usr/bin/bash 
elif [ -x /bin/bash ]; then
    exec /bin/bash 
elif [ -x /usr/local/bin/sh ]; then
    exec /usr/local/bin/sh 
elif [ -x /usr/bin/sh ]; then
    exec /usr/bin/sh 
elif [ -x /bin/sh ]; then
    exec /bin/sh 
elif [ -x /busybox/sh ]; then
    exec /busybox/sh 
else
    echo shell not found
    exit 1
fi
UsageError: Unknown option -c
    --?
        print command line options and exit
    -h, --help
        print usage information and exit
    -v, --version
        print the version information and exit
    -p, --propfile <argument>
        the jmeter property file to use
    -q, --addprop <argument>
        additional JMeter property file(s)
    -t, --testfile <argument>
        the jmeter test(.jmx) file to run. "-t LAST" will load last 
        used file
    -l, --logfile <argument>
        the file to log samples to
    -i, --jmeterlogconf <argument>
        jmeter logging configuration file (log4j2.xml)
    -j, --jmeterlogfile <argument>
        jmeter run log file (jmeter.log)
    -n, --nongui
        run JMeter in nongui mode
    -s, --server
        run the JMeter server
    -E, --proxyScheme <argument>
        Set a proxy scheme to use for the proxy server
    -H, --proxyHost <argument>
        Set a proxy server for JMeter to use
    -P, --proxyPort <argument>
        Set proxy server port for JMeter to use
    -N, --nonProxyHosts <argument>
        Set nonproxy host list (e.g. *.apache.|localhost)
    -u, --username <argument>
        Set username for proxy server that JMeter is to use
    -a, --password <argument>
        Set password for proxy server that JMeter is to use
    -J, --jmeterproperty <argument>=<value>
        Define additional JMeter properties
    -G, --globalproperty <argument>=<value>
        Define Global properties (sent to servers)
        e.g. -Gport=123
         or -Gglobal.properties
    -D, --systemproperty <argument>=<value>
        Define additional system properties
    -S, --systemPropertyFile <argument>
        additional system property file(s)
    -f, --forceDeleteResultFile
        force delete existing results files and web report folder if
         present before starting the test
    -L, --loglevel <argument>=<value>
        [category=]level e.g. jorphan=INFO, jmeter.util=DEBUG or com
        .example.foo=WARN
    -r, --runremote
        Start remote servers (as defined in remote_hosts)
    -R, --remotestart <argument>
        Start these remote servers (overrides remote_hosts)
    -d, --homedir <argument>
        the jmeter home directory to use
    -X, --remoteexit
        Exit the remote servers at end of test (non-GUI)
    -g, --reportonly <argument>
        generate report dashboard only, from a test results file
    -e, --reportatendofloadtests
        generate report dashboard after load test
    -o, --reportoutputfolder <argument>
        output folder for report dashboard
Error: Unknown option -c
END Running Jmeter on Mon Feb 24 10:25:01 CET 2025
Uploading artifacts for successful job
00:00
Uploading artifacts...
WARNING: report/: no matching files. Ensure that the artifact path is relative to the working directory (/builds/merco_ecosystem/ms_md_master) 
ERROR: No files to upload                          
Cleaning up project directory and file based variables
00:01
Job succeeded

?

Share Improve this question asked Feb 24 at 11:03 saranya tsaranya t 111 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 1

As per documentation:

The Docker image will accept the same parameters as jmeter itself, assuming you run JMeter non-GUI with -n

The syntax would be something like:

docker run -it justb4/jmeter -n -t test.jmx -l result.jtl -e -o report

More information: JMeter Non-GUI Mode: Useful Tips

本文标签: spring bootjmeterjava sprigboot applicationgitlab cicdreport generationStack Overflow