• 明白了,只需要在前台输入要巡检的 URL 就可以实现 UI 自动化巡检,程序自动跑

  • 看到了,写用例的话有先从那个文件开始,以及怎么串联,大佬有时间可以补充下

  • 话说用例在哪写,没太看明白

  • 有没有可能产品有桌面版的 ms

  • 必须可行啊

  • 大佬你这个项目不维护了吗

  • 统一回复,代码覆盖率并不是为了博眼球,就是单纯集合有想法的同学,搭建一个通用的代码覆盖率平台,后续需要拓展的功能,可以在此基础版本上去做二开,毕竟每个公司业务不一样,代码规范不一致,所以公共的基础基建很有必要。

  • 花神可以的,上个自动化就是用花神的,这次继续学习,不局限于当下,认真准备。

  • sh: allure: command not found

  • 大佬这块是不是错了 yaml.driver.py 应该是 yaml_driver.py

  • 这咋还搞了个需要搭梯子的文档,大佬能搞个本地的帮助文档吗

  • 帮助文档打不开

  • 有没有使用文档,比如提取变量作为参数之类的,看了下在线体验的,没找到这块的内容

  • 可以,我加你


  • 启用的时候报错的

  • 大佬有时间给看下这个报错呗,我看文档这块没写,报错说是 pydantic.error_wrappers。ValidationError:配置的 4 个验证错误
    REDIS_URI
    字段必需 (type=value_error.missing)
    DATABASE_URI
    字段必需 (type=value_error.missing)
    broker_url
    需要字段 (type=value_error.missing) Traceback (most recent call last):
    但是没找到解决办法
    File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker
    worker.init_process()
    File "/usr/local/lib/python3.6/site-packages/uvicorn/workers.py", line 66, in init_process
    super(UvicornWorker, self).init_process()
    File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
    File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
    File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
    File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
    File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
    File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 371, in import_app
    mod = importlib.import_module(module)
    File "/usr/lib64/python3.6/importlib/init.py", line 126, in import_module
    return bootstrap._gcd_import(name[level:], package, level)
    File "", line 994, in _gcd_import
    File "", line 971, in _find_and_load
    File "", line 955, in _find_and_load_unlocked
    File "", line 665, in _load_unlocked
    File "", line 678, in exec_module
    File "", line 219, in _call_with_frames_removed
    File "/root/zerorunner-master/backend/main.py", line 8, in
    from autotest.init.cors import init_cors
    File "/root/zerorunner-master/backend/autotest/init/cors.py", line 6, in
    from config import config
    File "/root/zerorunner-master/backend/config.py", line 115, in
    config = Configs()
    File "/usr/local/lib/python3.6/site-packages/pydantic/env_settings.py", line 44, in __init
    _
    secrets_dir=_secrets_dir,
    File "/usr/local/lib/python3.6/site-packages/pydantic/main.py", line 341, in __init
    _
    raise validation_error
    pydantic.error_wrappers.ValidationError: 4 validation errors for Configs
    REDIS_URI
    field required (type=value_error.missing)
    DATABASE_URI
    field required (type=value_error.missing)
    broker_url
    field required (type=value_error.missing)
    beat_db_uri
    field required (type=value_error.missing)
    [2024-03-22 10:11:20 +0800] [29398] [ERROR] Exception in worker process
    Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker
    worker.init_process()
    File "/usr/local/lib/python3.6/site-packages/uvicorn/workers.py", line 66, in init_process
    super(UvicornWorker, self).init_process()
    File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 134, in init_process
    self.load_wsgi()
    File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
    self.wsgi = self.app.wsgi()
    File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
    File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
    File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
    File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 371, in import_app
    mod = importlib.import_module(module)
    File "/usr/lib64/python3.6/importlib/init.py", line 126, in import_module
    return bootstrap._gcd_import(name[level:], package, level)
    File "", line 994, in _gcd_import
    File "", line 971, in _find_and_load
    File "", line 955, in _find_and_load_unlocked
    File "", line 665, in _load_unlocked
    File "", line 678, in exec_module
    File "", line 219, in _call_with_frames_removed
    File "/root/zerorunner-master/backend/main.py", line 8, in
    from autotest.init.cors import init_cors
    File "/root/zerorunner-master/backend/autotest/init/cors.py", line 6, in
    from config import config
    File "/root/zerorunner-master/backend/config.py", line 115, in
    config = Configs()
    File "/usr/local/lib/python3.6/site-packages/pydantic/env_settings.py", line 44, in __init
    _
    secrets_dir=_secrets_dir,
    File "/usr/local/lib/python3.6/site-packages/pydantic/main.py", line 341, in __init
    _
    raise validation_error
    pydantic.error_wrappers.ValidationError: 4 validation errors for Configs
    REDIS_URI
    field required (type=value_error.missing)
    DATABASE_URI
    field required (type=value_error.missing)
    broker_url
    field required (type=value_error.missing)
    beat_db_uri
    field required (type=value_error.missing)
    [2024-03-22 10:11:20 +0800] [29396] [INFO] Worker exiting (pid: 29396)
    [2024-03-22 10:11:20 +0800] [29398] [INFO] Worker exiting (pid: 29398)
    [2024-03-22 10:11:20 +0800] [29393] [ERROR] Worker (pid:29398) exited with code 3
    [2024-03-22 10:11:20 +0800] [29393] [ERROR] Worker (pid:29396) was sent SIGTERM!
    [2024-03-22 10:11:20 +0800] [29393] [ERROR] Shutting down: Master
    [2024-03-22 10:11:20 +0800] [29393] [ERROR] Reason: Worker failed to boot.

  • 按照文档部署,报上面的错,大佬有时间帮看下

  • Building wheels for collected packages: jsonpath, py-mock
    Building wheel for jsonpath (setup.py) ... error
    error: subprocess-exited-with-error

    × python setup.py bdist_wheel did not run successfully.
    │ exit code: 1
    ╰─> [32 lines of output]
    Traceback (most recent call last):
    File "", line 2, in
    File "", line 34, in
    File "/tmp/pip-install-fajpqut3/jsonpath_74969dfc1d114b37a06a2372f4e65848/setup.py", line 19, in
    setup(name=name,
    File "/pyenv/lib/python3.9/site-packages/setuptools/distutils/core.py", line 172, in setup
    ok = dist.parse_command_line()
    File "/pyenv/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 475, in parse_command_line
    args = self._parse_command_opts(parser, args)
    File "/pyenv/lib/python3.9/site-packages/setuptools/dist.py", line 869, in _parse_command_opts
    nargs = _Distribution._parse_command_opts(self, parser, args)
    File "/pyenv/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 534, in _parse_command_opts
    cmd_class = self.get_command_class(command)
    File "/pyenv/lib/python3.9/site-packages/setuptools/dist.py", line 714, in get_command_class
    self.cmdclass[command] = cmdclass = ep.load()
    File "/pyenv/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/
    init.py", line 208, in load
    module = import_module(match.group('module'))
    File "/usr/local/Python3/lib/python3.9/importlib/
    init.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File "", line 1030, in _gcd_import
    File "", line 1007, in _find_and_load
    File "", line 986, in _find_and_load_unlocked
    File "", line 680, in _load_unlocked
    File "", line 850, in exec_module
    File "", line 228, in _call_with_frames_removed
    File "/pyenv/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 27, in
    from .macosx_libfile import calculate_macosx_platform_tag
    File "/pyenv/lib/python3.9/site-packages/wheel/macosx_libfile.py", line 43, in
    import ctypes
    File "/usr/local/Python3/lib/python3.9/ctypes/
    init_.py", line 8, in
    from _ctypes import Union, Structure, Array
    ModuleNotFoundError: No module named '_ctypes'
    [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for jsonpath
    Running setup.py clean for jsonpath
    Building wheel for py-mock (setup.py) ... error
    error: subprocess-exited-with-error

    × python setup.py bdist_wheel did not run successfully.
    │ exit code: 1
    ╰─> [34 lines of output]
    Traceback (most recent call last):
    File "", line 2, in
    File "", line 34, in
    File "/tmp/pip-install-fajpqut3/py-mock_7899cc66e4284d25b9c8e564cd655047/setup.py", line 10, in
    setuptools.setup(
    File "/pyenv/lib/python3.9/site-packages/setuptools/init.py", line 104, in setup
    return distutils.core.setup(**attrs)
    File "/pyenv/lib/python3.9/site-packages/setuptools/distutils/core.py", line 172, in setup
    ok = dist.parse_command_line()
    File "/pyenv/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 475, in parse_command_line
    args = self._parse_command_opts(parser, args)
    File "/pyenv/lib/python3.9/site-packages/setuptools/dist.py", line 869, in _parse_command_opts
    nargs = _Distribution._parse_command_opts(self, parser, args)
    File "/pyenv/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 534, in _parse_command_opts
    cmd_class = self.get_command_class(command)
    File "/pyenv/lib/python3.9/site-packages/setuptools/dist.py", line 714, in get_command_class
    self.cmdclass[command] = cmdclass = ep.load()
    File "/pyenv/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/
    init.py", line 208, in load
    module = import_module(match.group('module'))
    File "/usr/local/Python3/lib/python3.9/importlib/
    init.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File "", line 1030, in _gcd_import
    File "", line 1007, in _find_and_load
    File "", line 986, in _find_and_load_unlocked
    File "", line 680, in _load_unlocked
    File "", line 850, in exec_module
    File "", line 228, in _call_with_frames_removed
    File "/pyenv/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 27, in
    from .macosx_libfile import calculate_macosx_platform_tag
    File "/pyenv/lib/python3.9/site-packages/wheel/macosx_libfile.py", line 43, in
    import ctypes
    File "/usr/local/Python3/lib/python3.9/ctypes/
    init_.py", line 8, in
    from _ctypes import Union, Structure, Array
    ModuleNotFoundError: No module named '_ctypes'
    [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for py-mock
    Running setup.py clean for py-mock
    Failed to build jsonpath py-mock
    ERROR: Could not build wheels for jsonpath, py-mock, which is required to install pyproject.toml-based projects




  • 大佬,这个要整个替换掉,需要改啥配置吗

  • 太赞了

  • File "/Users/mac/Desktop/DiffTestPlats/DiffTestPlatform/urls.py", line 18, in
    from CodeDiff import views
    File "/Users/mac/Desktop/DiffTestPlats/CodeDiff/views.py", line 5, in
    from CodeDiff.util.run_diff import RunDiff
    File "/Users/mac/Desktop/DiffTestPlats/CodeDiff/util/run_diff.py", line 6, in
    from git import Repo
    ModuleNotFoundError: No module named 'git'
    (venv) macdeMacBook-Pro-6:DiffTestPlats mac$
    各种报错,大佬方便回复下吧

  • 测试覆盖率二改实现 at 2024年02月21日

    代码开源了吗,可以一起共建

  • 要配置并行控制器,可以这样设置,不知道符不符合你的需求

    1. 将并行控制器添加到您的测试计划。
    2. 在 “线程数” 字段中,指定要并行执行的线程数。
    3. 在 “持续时间” 字段中,指定并行控制器应运行的持续时间(以秒为单位)。
    4. 在 “延迟” 字段中,指定在每个线程开始执行之前要等待的时间(以毫秒为单位)。
  • 第四步,需要你和开发运维一起去确定,研发给到你预期的 QPS,然后看你们线上的机器配置以及可承受的压力。

  • 暂时想到的是这些,之前做过类似的,不知道你能不能用到。

    1. 数据加密脱敏验证:
    2. 确保在数据拉取过程中对敏感数据进行加密和脱敏处理,并验证加密和脱敏算法的正确性。
    3. 针对敏感字段,可以使用随机生成的测试数据进行加密和脱敏操作,然后验证加密和脱敏后的数据是否符合预期。
    4. 针对不同类型的敏感数据(如姓名、身份证号、银行账号等),使用不同的加密和脱敏算法进行验证。

    5. 数据完整性验证:

    6. 在数据拉取过程中,确保数据的完整性,即所有的数据都成功地传输到目标环境。

    7. 验证数据的总量是否与源环境一致,可以通过对比源环境和目标环境的数据记录数或数据量来进行验证。

    8. 验证数据是否有丢失或重复,可以通过比较源环境和目标环境的数据内容和关键字段来进行验证。

    9. 数据一致性验证:

    10. 确保数据在两个环境之间的同步性,即目标环境中的数据与源环境中的数据保持一致。

    11. 验证数据的一致性,可以通过比较源环境和目标环境中的数据内容、关键字段和业务逻辑来进行验证。

    12. 针对关键业务指标或数据关联关系,可以进行一致性验证,确保在目标环境中的数据与源环境中的数据一致。

    13. 非直连环境的数据验证:

    14. 如果两个环境之间存在网络隔离或不允许直接连接,可以考虑使用中间介质或工具来传输数据,如加密传输文件、使用安全网关等。

    15. 在数据传输过程中,确保数据的完整性和安全性,以及对传输过程中的异常情况进行监控和处理。