yandex / yandex-tank

Load and performance benchmark tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add tag expressions to avoid creation of multiple files for each test case.

vveliev opened this issue · comments

Problem: When requirements to load particular functionality of the application, current solution to have multiple yml files with different sets of URI's or multiple files. Regardless of what plugin is used, there is currently no easy way to change set of missiles that we want to use for current load, without creating more files.

Other testing tools like "cucumber" have solved this problem by using tags. Where you can tag each test case or group. This will allow selecting a particular set of (functionality to be tested or profiled).

Ex:

1. yandex-tank -c bfg_load.yml --tag @user_create,@user_update 
2. yandex-tank -c bfg_load.yml --tag not @admin_delete

some information about tag expressions
https://github.com/cucumber/cucumber/tree/master/tag-expressions

We're currently working on -o (--overwrite-option) which will allow to patch your config with small yaml snippets like this:
yandex-tank -c load.yaml -o 'bfg: {ammo_file: ammo.txt}'
- is this covering your case?
thank you for the report

no, the goal is to avoid multiple ammo files as well. (in BFG case, ammo file have a list of your functions and arguments if any. The best scenario is to tag those lines and have single ammo file with all possible cases and then select subsets using tags).

yet for BFG yml ammo file is probably a better option ;)

create_user:
  _tags_: 
    - user
    - create_user
update_user:  
  _tags_: 
    - user
    - update_user
  arguments:
    user_type: law_enforcement   

There is chosen_cases option that allows you to filter ammo by case.

chosen_cases - this may work as work around, but that still does not do grouping , in the way that with multiple tags grouping can be more flexible.