Code Monkey home page Code Monkey logo

easy-locust's Introduction

Easy-Locust

Locust Links

Description

Easy-Locust is an extension tool for Locust. With this tool, you don't need to write locust scripts. What you need to do is just to edit Excel. Easy-Locust will generate locustfile automatically and run it.

If you need master-slave mode, you just need to fill Excel Sheet 'Slave', and use --master. The only precondition is to install the same version locustio in each Slave. Easy-Locust is not necessary for slaves.

easy-locust --web --web-port=8899 -- Run in web mode, you can config and trigger slave-nodes with this mode.

Use easy-locust --demo to generate an Excel demo, fill it and start your test.

Same parameters with locust, so I just introduce the different parameters here:

easy-locust -f xxx.xls -- This will transform Excel to locustfile, and run it. You can also use -f xxx.py.

easy-locust --xf xxx.xls -- -- This just transform Excel to locustfile, will not start test.

easy-locust -f xxx.xls --master -d -- -d is distributed mode, can automatically run slaves. There is one precondition, you need write slaves information in Excel at Slave Sheet.

easy-locust -f xxx.xls --master -d --boomer -- --boomer running boomer client in slaves, which is compiling by Golang. In this mode expect_code and expect_str is inoperative. Please keep port 9999 is unused in each slave, when using this mode.

OR, use:

import easy_locust

data = {
    "config": {},
    "apis": [],
    "auth": {},
    "user_info": [],
    "master_ip": "",
    "slaves": []
}

locustfile_str = easy_locust.factory(data)

Bug reporting

Open a Github issue and follow the template listed there.

https://github.com/GuoTengda1993/easy-locust

Authors

  • Guo Tengda

License

Open source licensed under the MIT license (see LICENSE file for details).

Change Log

  • 0.2.1: Easy-locust web mode.
  • 0.1.12: content-type support.
  • 0.1.11: Add boomer client as slave, which has much more preformance.
  • 0.1.10: Delete useless code.
  • 0.1.9: Support Json to locustfile. And can use easy_locust.factory(dict) to get strings of locustfile.
  • 0.1.6: Optimize locustFileFactory.py
  • 0.1.5: Check Response info (status code & expect str) if set "Expect Status Code" in Excel, otherwise not. Rely on locustio>=0.13.5

easy-locust's People

Contributors

guotengda1993 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

easy-locust's Issues

运行easy-locust -f DtDemo.py 报错

[2020-09-21 14:19:29,107] DESKTOP-EAU5IQF/ERROR/stderr:
[2020-09-21 14:19:29,107] DESKTOP-EAU5IQF/ERROR/stderr: exec(code, run_globals)
[2020-09-21 14:19:29,107] DESKTOP-EAU5IQF/ERROR/stderr:
[2020-09-21 14:19:29,107] DESKTOP-EAU5IQF/ERROR/stderr: File "D:\Program Files (x86)\Python3.7.4\Scripts\easy-locust.exe_main_.py", line 9, in
[2020-09-21 14:19:29,108] DESKTOP-EAU5IQF/ERROR/stderr: File "d:\program files (x86)\python3.7.4\lib\site-packages\easy_locust\main.py", line 569, in main
[2020-09-21 14:19:29,108] DESKTOP-EAU5IQF/ERROR/stderr:
[2020-09-21 14:19:29,109] DESKTOP-EAU5IQF/ERROR/stderr: gevent.signal(signal.SIGTERM, sig_term_handler)
[2020-09-21 14:19:29,109] DESKTOP-EAU5IQF/ERROR/stderr:
[2020-09-21 14:19:29,109] DESKTOP-EAU5IQF/ERROR/stderr: TypeError
[2020-09-21 14:19:29,109] DESKTOP-EAU5IQF/ERROR/stderr: :
[2020-09-21 14:19:29,109] DESKTOP-EAU5IQF/ERROR/stderr: 'module' object is not callable
[2020-09-21 14:19:29,110] DESKTOP-EAU5IQF/ERROR/stderr:

**** Locust package has moved from 'locustio' to 'locust'. Please update your reference (or pin your version to 0.14.6 if you dont want to update to 1.0) ****

ERROR: Command errored out with exit status 1:
 command: 'e:\web\tester\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\KnightBlood\\AppData\\Local\\Temp\\pip-install-hhqlmmme\\locustio_69ccae436527433396c624e4e81ba8b1\\setup.py'"'"'; __file__='"'"'C:\\Users\\

KnightBlood\AppData\Local\Temp\pip-install-hhqlmmme\locustio_69ccae436527433396c624e4e81ba8b1\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exe
c'"'"'))' install --record 'C:\Users\KnightBlood\AppData\Local\Temp\pip-record-u0tn8z68\install-record.txt' --single-version-externally-managed --compile --install-headers 'e:\web\tester\venv\include\site\python3.9\locustio'
cwd: C:\Users\KnightBlood\AppData\Local\Temp\pip-install-hhqlmmme\locustio_69ccae436527433396c624e4e81ba8b1
Complete output (4 lines):
running install

**** Locust package has moved from 'locustio' to 'locust'. Please update your reference (or pin your version to 0.14.6 if you dont want to update to 1.0) ****

----------------------------------------

ERROR: Command errored out with exit status 1: 'e:\web\tester\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\KnightBlood\AppData\Local\Temp\pip-install-hhqlmmme\locustio_69ccae436527433396c624e4e81ba8b1\setup.p
y'"'"'; file='"'"'C:\Users\KnightBlood\AppData\Local\Temp\pip-install-hhqlmmme\locustio_69ccae436527433396c624e4e81ba8b1\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec
(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\KnightBlood\AppData\Local\Temp\pip-record-u0tn8z68\install-record.txt' --single-version-externally-managed --compile --install-headers 'e:\web\tester\venv\include\site\python3.9\locustio' Check t
he logs for full command output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.