首页 > 解决方案 > 标签在蝗虫中没有响应

问题描述

我有两个挑战:

  1. 我正在尝试使用--tagsdocker-compose.yml它不起作用,这是一个片段
    @tag('get_all_themes')
    @task
    def get_all_themes(self):
        self.client.get('/atlasnextgen/public-api/v1/themas',
                        headers={"Authorization": f"Basic {auth}"})

    @tag('get_themes_uuid')
    @task
    def get_themes_by_uuid(self):
        self.client.get(f'/atlasnextgen/public-api/v1/themas/{uuid}',
                        headers={"Authorization": f"Basic {auth}"})

docker-compose.yml 中的命令是:-f /mnt/locust/public_apis/themes.py --master -u 50 -r 10 -t 60s --headless --print-stats --csv /mnt/locust/reports/csv/result_for --csv-full-history --html /mnt/locust/reports/html/docker_loadtest_result.html --tags get_all_themes 请问我做错了什么?

  1. 如何在 docker-compose 文件中运行命令,以便每个命令使用特定标签?

标签: pythondockerdocker-composeperformance-testinglocust

解决方案


推荐阅读