mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-28 19:47:14 +08:00
rename package name from ate to httprunner
This commit is contained in:
+1
-1
@@ -8,6 +8,6 @@ python:
|
|||||||
install:
|
install:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
script:
|
script:
|
||||||
- coverage run --source=ate -m unittest discover
|
- coverage run --source=httprunner -m unittest discover
|
||||||
after_success:
|
after_success:
|
||||||
- coveralls
|
- coveralls
|
||||||
+2
-1
@@ -1 +1,2 @@
|
|||||||
include README.md
|
include README.md
|
||||||
|
include requirements.txt
|
||||||
@@ -35,18 +35,18 @@ To upgrade all specified packages to the newest available version, you should ad
|
|||||||
|
|
||||||
If there is a problem with the installation or upgrade, you can check the [`FAQ`](docs/FAQ.md).
|
If there is a problem with the installation or upgrade, you can check the [`FAQ`](docs/FAQ.md).
|
||||||
|
|
||||||
To ensure the installation or upgrade is successful, you can execute command `ate -V` to see if you can get the correct version number.
|
To ensure the installation or upgrade is successful, you can execute command `httprunner -V` to see if you can get the correct version number.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
$ ate -V
|
$ httprunner -V
|
||||||
HttpRunner version: 0.8.0
|
HttpRunner version: 0.8.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Execute the command `ate -h` to view command help.
|
Execute the command `httprunner -h` to view command help.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
$ ate -h
|
$ httprunner -h
|
||||||
usage: ate [-h] [-V] [--log-level LOG_LEVEL] [--report-name REPORT_NAME]
|
usage: httprunner [-h] [-V] [--log-level LOG_LEVEL] [--report-name REPORT_NAME]
|
||||||
[--failfast] [--startproject STARTPROJECT]
|
[--failfast] [--startproject STARTPROJECT]
|
||||||
[testset_paths [testset_paths ...]]
|
[testset_paths [testset_paths ...]]
|
||||||
|
|
||||||
@@ -131,25 +131,25 @@ For detailed regulations of writing testcases, you can read the [`QuickStart`][q
|
|||||||
You can run single testset by specifying testset file path.
|
You can run single testset by specifying testset file path.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
$ ate filepath/testcase.yml
|
$ httprunner filepath/testcase.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also run several testsets by specifying multiple testset file paths.
|
You can also run several testsets by specifying multiple testset file paths.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
$ ate filepath1/testcase1.yml filepath2/testcase2.yml
|
$ httprunner filepath1/testcase1.yml filepath2/testcase2.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to run testsets of a whole project, you can achieve this goal by specifying the project folder path.
|
If you want to run testsets of a whole project, you can achieve this goal by specifying the project folder path.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
$ ate testcases_folder_path
|
$ httprunner testcases_folder_path
|
||||||
```
|
```
|
||||||
|
|
||||||
When you do continuous integration test or production environment monitoring with `Jenkins`, you may need to send test result notification. For instance, you can send email with mailgun service as below.
|
When you do continuous integration test or production environment monitoring with `Jenkins`, you may need to send test result notification. For instance, you can send email with mailgun service as below.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
$ ate filepath/testcase.yml --report-name ${BUILD_NUMBER} \
|
$ httprunner filepath/testcase.yml --report-name ${BUILD_NUMBER} \
|
||||||
--mailgun-smtp-username "qa@debugtalk.com" \
|
--mailgun-smtp-username "qa@debugtalk.com" \
|
||||||
--mailgun-smtp-password "12345678" \
|
--mailgun-smtp-password "12345678" \
|
||||||
--email-sender excited@samples.mailgun.org \
|
--email-sender excited@samples.mailgun.org \
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
__version__ = '0.8.0'
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
__version__ = '0.8.1a'
|
||||||
@@ -7,7 +7,7 @@ import random
|
|||||||
import string
|
import string
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from ate.exception import ParamsError
|
from httprunner.exception import ParamsError
|
||||||
|
|
||||||
|
|
||||||
def gen_random_string(str_len):
|
def gen_random_string(str_len):
|
||||||
@@ -6,10 +6,10 @@ from collections import OrderedDict
|
|||||||
|
|
||||||
import PyUnitReport
|
import PyUnitReport
|
||||||
from PyUnitReport import __version__ as pyu_version
|
from PyUnitReport import __version__ as pyu_version
|
||||||
from ate import __version__ as ate_version
|
from httprunner import __version__ as ate_version
|
||||||
from ate import exception
|
from httprunner import exception
|
||||||
from ate.task import TaskSuite
|
from httprunner.task import TaskSuite
|
||||||
from ate.utils import create_scaffold
|
from httprunner.utils import create_scaffold
|
||||||
|
|
||||||
|
|
||||||
def main_ate():
|
def main_ate():
|
||||||
@@ -98,7 +98,7 @@ def main_locust():
|
|||||||
""" Performance test with locust: parse command line options and run commands.
|
""" Performance test with locust: parse command line options and run commands.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
from ate import locusts
|
from httprunner import locusts
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print("Locust is not installed, exit.")
|
print("Locust is not installed, exit.")
|
||||||
exit(1)
|
exit(1)
|
||||||
@@ -4,7 +4,7 @@ import re
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from ate.exception import ParamsError
|
from httprunner.exception import ParamsError
|
||||||
from requests import Request, Response
|
from requests import Request, Response
|
||||||
from requests.exceptions import (InvalidSchema, InvalidURL, MissingSchema,
|
from requests.exceptions import (InvalidSchema, InvalidURL, MissingSchema,
|
||||||
RequestException)
|
RequestException)
|
||||||
@@ -4,8 +4,8 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from ate import utils
|
from httprunner import utils
|
||||||
from ate.testcase import TestcaseParser
|
from httprunner.testcase import TestcaseParser
|
||||||
|
|
||||||
|
|
||||||
class Context(object):
|
class Context(object):
|
||||||
@@ -37,7 +37,7 @@ class Context(object):
|
|||||||
self.testcase_parser.update_binded_variables(self.testcase_variables_mapping)
|
self.testcase_parser.update_binded_variables(self.testcase_variables_mapping)
|
||||||
|
|
||||||
if level == "testset":
|
if level == "testset":
|
||||||
self.import_module_items(["ate.built_in"], "testset")
|
self.import_module_items(["httprunner.built_in"], "testset")
|
||||||
|
|
||||||
def config_context(self, config_dict, level):
|
def config_context(self, config_dict, level):
|
||||||
if level == "testset":
|
if level == "testset":
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
import zmq
|
import zmq
|
||||||
from locust import HttpLocust, TaskSet, task
|
from locust import HttpLocust, TaskSet, task
|
||||||
from locust.events import request_failure
|
from locust.events import request_failure
|
||||||
from ate import runner
|
from httprunner import runner
|
||||||
|
|
||||||
class WebPageTasks(TaskSet):
|
class WebPageTasks(TaskSet):
|
||||||
def on_start(self):
|
def on_start(self):
|
||||||
@@ -3,7 +3,7 @@ import multiprocessing
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from ate.testcase import load_test_file
|
from httprunner.testcase import load_test_file
|
||||||
from locust.main import main
|
from locust.main import main
|
||||||
|
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@ import logging
|
|||||||
import re
|
import re
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from ate import exception, utils
|
from httprunner import exception, utils
|
||||||
from requests.structures import CaseInsensitiveDict
|
from requests.structures import CaseInsensitiveDict
|
||||||
|
|
||||||
text_extractor_regexp_compile = re.compile(r".*\(.*\).*")
|
text_extractor_regexp_compile = re.compile(r".*\(.*\).*")
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from ate import exception, response, testcase, utils
|
from httprunner import exception, response, testcase, utils
|
||||||
from ate.client import HttpSession
|
from httprunner.client import HttpSession
|
||||||
from ate.context import Context
|
from httprunner.context import Context
|
||||||
|
|
||||||
|
|
||||||
class Runner(object):
|
class Runner(object):
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import logging
|
import logging
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from ate import exception, runner, testcase, utils
|
from httprunner import exception, runner, testcase, utils
|
||||||
|
|
||||||
|
|
||||||
class ApiTestCase(unittest.TestCase):
|
class ApiTestCase(unittest.TestCase):
|
||||||
@@ -6,7 +6,7 @@ import os
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
from ate import exception, utils
|
from httprunner import exception, utils
|
||||||
|
|
||||||
variable_regexp = r"\$([\w_]+)"
|
variable_regexp = r"\$([\w_]+)"
|
||||||
function_regexp = r"\$\{([\w_]+\([\$\w_ =,]*\))\}"
|
function_regexp = r"\$\{([\w_]+\([\$\w_ =,]*\))\}"
|
||||||
@@ -11,7 +11,7 @@ import types
|
|||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
from ate import exception
|
from httprunner import exception
|
||||||
from requests.structures import CaseInsensitiveDict
|
from requests.structures import CaseInsensitiveDict
|
||||||
|
|
||||||
try:
|
try:
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
""" used for debugging
|
""" used for debugging
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ate.cli import main_ate
|
from httprunner.cli import main_ate
|
||||||
main_ate()
|
main_ate()
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
""" used for debugging
|
""" used for debugging
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from ate.cli import main_locust
|
from httprunner.cli import main_locust
|
||||||
main_locust()
|
main_locust()
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#encoding: utf-8
|
#encoding: utf-8
|
||||||
import io
|
import io
|
||||||
|
|
||||||
from ate import __version__
|
from httprunner import __version__
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
with io.open("README.md", encoding='utf-8') as f:
|
with io.open("README.md", encoding='utf-8') as f:
|
||||||
@@ -20,7 +20,7 @@ setup(
|
|||||||
license='MIT',
|
license='MIT',
|
||||||
packages=find_packages(exclude=['test.*', 'test']),
|
packages=find_packages(exclude=['test.*', 'test']),
|
||||||
package_data={
|
package_data={
|
||||||
'ate': ['locustfile_template'],
|
'httprunner': ['locustfile_template'],
|
||||||
},
|
},
|
||||||
keywords='api test',
|
keywords='api test',
|
||||||
install_requires=install_requires,
|
install_requires=install_requires,
|
||||||
@@ -33,8 +33,9 @@ setup(
|
|||||||
],
|
],
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'ate=ate.cli:main_ate',
|
'ate=httprunner.cli:main_ate',
|
||||||
'locusts=ate.cli:main_locust'
|
'httprunner=httprunner.cli:main_ate',
|
||||||
|
'locusts=httprunner.cli:main_locust'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ import hashlib
|
|||||||
import json
|
import json
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
from ate import utils
|
from httprunner import utils
|
||||||
from flask import Flask, make_response, request
|
from flask import Flask, make_response, request
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ import time
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from ate import utils
|
from httprunner import utils
|
||||||
from tests import api_server
|
from tests import api_server
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from ate.client import HttpSession, prepare_kwargs
|
from httprunner.client import HttpSession, prepare_kwargs
|
||||||
from tests.base import ApiServerUnittest
|
from tests.base import ApiServerUnittest
|
||||||
|
|
||||||
class TestHttpClient(ApiServerUnittest):
|
class TestHttpClient(ApiServerUnittest):
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import os
|
|||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from ate import runner, testcase, utils
|
from httprunner import runner, testcase, utils
|
||||||
from ate.context import Context
|
from httprunner.context import Context
|
||||||
from ate.exception import ParamsError
|
from httprunner.exception import ParamsError
|
||||||
|
|
||||||
|
|
||||||
class VariableBindsUnittest(unittest.TestCase):
|
class VariableBindsUnittest(unittest.TestCase):
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import requests
|
import requests
|
||||||
from ate import response, exception
|
from httprunner import response, exception
|
||||||
from tests.base import ApiServerUnittest
|
from tests.base import ApiServerUnittest
|
||||||
|
|
||||||
class TestResponse(ApiServerUnittest):
|
class TestResponse(ApiServerUnittest):
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from ate import exception, runner, testcase
|
from httprunner import exception, runner, testcase
|
||||||
|
|
||||||
from tests.base import ApiServerUnittest
|
from tests.base import ApiServerUnittest
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from ate import task
|
from httprunner import task
|
||||||
from ate.testcase import load_test_file
|
from httprunner.testcase import load_test_file
|
||||||
from tests.base import ApiServerUnittest
|
from tests.base import ApiServerUnittest
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import os
|
|||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from ate import testcase
|
from httprunner import testcase
|
||||||
from ate.exception import ApiNotFound, FileFormatError, ParamsError
|
from httprunner.exception import ApiNotFound, FileFormatError, ParamsError
|
||||||
|
|
||||||
|
|
||||||
class TestcaseParserUnittest(unittest.TestCase):
|
class TestcaseParserUnittest(unittest.TestCase):
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from ate import exception, utils
|
from httprunner import exception, utils
|
||||||
from tests.base import ApiServerUnittest
|
from tests.base import ApiServerUnittest
|
||||||
|
|
||||||
|
|
||||||
@@ -155,7 +155,7 @@ class TestUtils(ApiServerUnittest):
|
|||||||
self.assertIn("walk", dir(imported_module))
|
self.assertIn("walk", dir(imported_module))
|
||||||
|
|
||||||
def test_filter_module_functions(self):
|
def test_filter_module_functions(self):
|
||||||
imported_module = utils.get_imported_module("ate.utils")
|
imported_module = utils.get_imported_module("httprunner.utils")
|
||||||
self.assertIn("PYTHON_VERSION", dir(imported_module))
|
self.assertIn("PYTHON_VERSION", dir(imported_module))
|
||||||
|
|
||||||
functions_dict = utils.filter_module(imported_module, "function")
|
functions_dict = utils.filter_module(imported_module, "function")
|
||||||
|
|||||||
Reference in New Issue
Block a user