2004-12-11 05:32:55 +08:00
|
|
|
@echo off
|
2019-12-28 21:03:53 +08:00
|
|
|
rem
|
|
|
|
rem Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
rem contributor license agreements. See the NOTICE file distributed with
|
|
|
|
rem this work for additional information regarding copyright ownership.
|
|
|
|
rem The ASF licenses this file to you under the Apache License, Version 2.0
|
|
|
|
rem (the "License"); you may not use this file except in compliance with
|
|
|
|
rem the License. You may obtain a copy of the License at
|
|
|
|
rem
|
|
|
|
rem http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
rem
|
|
|
|
rem Unless required by applicable law or agreed to in writing, software
|
|
|
|
rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
rem See the License for the specific language governing permissions and
|
|
|
|
rem limitations under the License.
|
|
|
|
rem
|
2004-12-11 05:32:55 +08:00
|
|
|
|
|
|
|
rem ============================================
|
2017-10-28 02:55:18 +08:00
|
|
|
rem Non-GUI version of JMETER.BAT
|
2004-12-11 05:32:55 +08:00
|
|
|
rem
|
|
|
|
rem Drop a JMX file on this batch script, and it
|
|
|
|
rem will run it in non-GUI mode, with a log file
|
|
|
|
rem formed from the input file name but with the
|
|
|
|
rem extension .jtl
|
|
|
|
rem
|
|
|
|
rem Only the first parameter is used.
|
|
|
|
rem
|
|
|
|
rem ============================================
|
|
|
|
|
|
|
|
rem Check file is supplied
|
|
|
|
if a == a%1 goto winNT2
|
2008-05-09 00:13:16 +08:00
|
|
|
|
|
|
|
rem Allow special name LAST
|
2010-02-17 20:19:41 +08:00
|
|
|
if LAST == %1 goto winNT3
|
2008-05-09 00:13:16 +08:00
|
|
|
|
2004-12-11 05:32:55 +08:00
|
|
|
rem Check it has extension .jmx
|
2010-02-17 20:19:41 +08:00
|
|
|
if "%~x1" == ".jmx" goto winNT3
|
2004-12-11 05:32:55 +08:00
|
|
|
:winNT2
|
|
|
|
echo Please supply a script name with the extension .jmx
|
2005-03-18 23:27:20 +08:00
|
|
|
pause
|
2007-09-02 19:27:29 +08:00
|
|
|
goto END
|
2004-12-11 05:32:55 +08:00
|
|
|
:winNT3
|
|
|
|
|
2006-04-10 08:16:31 +08:00
|
|
|
rem Change to script directory
|
2007-03-15 17:34:07 +08:00
|
|
|
pushd %~dp1
|
2006-04-10 08:16:31 +08:00
|
|
|
|
2006-04-08 08:26:05 +08:00
|
|
|
rem use same directory to find jmeter script
|
2011-03-05 01:02:40 +08:00
|
|
|
call "%~dp0"jmeter -n -t "%~nx1" -j "%~n1.log" -l "%~n1.jtl" %2 %3 %4 %5 %6 %7 %8 %9
|
2007-03-15 17:34:07 +08:00
|
|
|
|
|
|
|
popd
|
2006-03-30 04:25:27 +08:00
|
|
|
|
2019-12-28 21:03:53 +08:00
|
|
|
:END
|