mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
bugfix: debug entrance
This commit is contained in:
@@ -12,12 +12,12 @@ Then install all dependencies:
|
||||
$ pip install -r requirements-dev.txt
|
||||
```
|
||||
|
||||
Now you can use `httprunner/cli.py` as debugging entrances.
|
||||
Now you can use `main-debug.py` as debugging entrances.
|
||||
|
||||
```bash
|
||||
# debug hrun
|
||||
$ python httprunner/cli.py hrun -h
|
||||
$ python main-debug.py hrun -h
|
||||
|
||||
# debug locusts
|
||||
$ python httprunner/cli.py locusts -h
|
||||
$ python main-debug.py locusts -h
|
||||
```
|
||||
|
||||
@@ -143,12 +143,3 @@ def main_locust():
|
||||
locusts.run_locusts_on_cpu_cores(sys.argv, cpu_cores_num_value)
|
||||
else:
|
||||
locusts.main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
cmd = sys.argv.pop(1)
|
||||
|
||||
if cmd in ["hrun", "httprunner", "ate"]:
|
||||
main_hrun()
|
||||
elif cmd in ["locust", "locusts"]:
|
||||
main_locust()
|
||||
|
||||
10
main-debug.py
Normal file
10
main-debug.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import sys
|
||||
|
||||
from httprunner.cli import main_hrun, main_locust
|
||||
|
||||
cmd = sys.argv.pop(1)
|
||||
|
||||
if cmd in ["hrun", "httprunner", "ate"]:
|
||||
main_hrun()
|
||||
elif cmd in ["locust", "locusts"]:
|
||||
main_locust()
|
||||
Reference in New Issue
Block a user