yandex-tank icon indicating copy to clipboard operation
yandex-tank copied to clipboard

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

Open vveliev opened this issue 6 years ago • 4 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

vveliev avatar May 29 '18 13:05 vveliev

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

fomars avatar May 29 '18 14:05 fomars

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   

vveliev avatar May 29 '18 14:05 vveliev

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

direvius avatar May 30 '18 05:05 direvius

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.

vveliev avatar May 31 '18 21:05 vveliev