{"id":42212921,"url":"https://github.com/foliant-docs/foliantcontrib.testrail","last_synced_at":"2026-01-27T01:06:55.604Z","repository":{"id":57431773,"uuid":"147328132","full_name":"foliant-docs/foliantcontrib.testrail","owner":"foliant-docs","description":"Preprocessor for Foliant that downloads test cases from TestRail project to the software test document","archived":false,"fork":false,"pushed_at":"2020-08-26T09:15:30.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-09-21T00:11:11.069Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foliant-docs.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-04T10:21:07.000Z","updated_at":"2020-08-26T09:15:10.000Z","dependencies_parsed_at":"2022-09-02T10:52:39.976Z","dependency_job_id":null,"html_url":"https://github.com/foliant-docs/foliantcontrib.testrail","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/foliant-docs/foliantcontrib.testrail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.testrail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.testrail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.testrail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.testrail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foliant-docs","download_url":"https://codeload.github.com/foliant-docs/foliantcontrib.testrail/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.testrail/sbom","scorecard":{"id":406110,"data":{"date":"2025-08-11","repo":{"name":"github.com/foliant-docs/foliantcontrib.testrail","commit":"5a480e676b2f2f51ac739255c67fb2ba79c6a7eb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'develop'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T21:18:00.671Z","repository_id":57431773,"created_at":"2025-08-18T21:18:00.671Z","updated_at":"2025-08-18T21:18:00.671Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28794642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-27T01:06:54.786Z","updated_at":"2026-01-27T01:06:55.592Z","avatar_url":"https://github.com/foliant-docs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/pypi/v/foliantcontrib.testrail.svg)](https://pypi.org/project/foliantcontrib.testrail/) [![](https://img.shields.io/github/v/tag/foliant-docs/foliantcontrib.testrail.svg?label=GitHub)](https://github.com/foliant-docs/foliantcontrib.testrail)\n\n# TestRail cases downloader for Foliant\n\nTestRail preprocessor collects test cases from TestRail project and adds to your testing procedure document.\n\n\u003e Important notice! We have some problems with displaying an exclamation mark in the image links, so they are replaced with `(leading_exclamation_mark_here)` phrase in the text.\n\n## Installation\n\n```shell\n$ pip install foliantcontrib.testrail\n```\n\n\n## Config\n\nTo enable the preprocessor, add `testrail` to `preprocessors` section in the project config. The preprocessor has a number of options (best values are set by default where possible):\n\n```yaml\npreprocessors:\n  - testrail:\n    testrail_url: http://testrails.url                                                      \\\\ Required\n    testrail_login: username                                                                \\\\ Required\n    testrail_pass: !env TESTRAIL_PASS                                                                 \\\\ Required\n    project_id: 35                                                                          \\\\ Required\n    suite_ids:                                                                              \\\\ Optional\n    section_ids:                                                                            \\\\ Optional\n    exclude_suite_ids:                                                                      \\\\ Optional\n    exclude_section_ids:                                                                    \\\\ Optional\n    exclude_case_ids:                                                                       \\\\ Optional\n    filename: test_cases.md                                                                 \\\\ Optional\n    rewrite_src_files: false                                                                \\\\ Optional\n    template_folder: case_templates                                                         \\\\ Optional\n    img_folder: testrail_imgs                                                               \\\\ Optional\n    move_imgs_from_text: false                                                              \\\\ Optional\n    section_header: Testing program                                                         \\\\ Recommended\n    std_table_header: Table with testing results                                            \\\\ Recommended\n    std_table_column_headers: №; Priority; Platform; ID; Test case name; Result; Comment    \\\\ Recommended\n    add_std_table: true                                                                     \\\\ Optional\n    add_suite_headers: true                                                                 \\\\ Optional\n    add_section_headers: true                                                               \\\\ Optional\n    add_case_id_to_case_header: false                                                       \\\\ Optional\n    add_case_id_to_std_table: false                                                         \\\\ Optional\n    multi_param_name:                                                                       \\\\ Optional\n    multi_param_select:                                                                     \\\\ Optional\n    multi_param_select_type: any                                                            \\\\ Optional\n    add_cases_without_multi_param: true                                                     \\\\ Optional\n    add_multi_param_to_case_header: false                                                   \\\\ Optional\n    add_multi_param_to_std_table: false                                                     \\\\ Optional\n    checkbox_param_name:                                                                    \\\\ Optional\n    checkbox_param_select_type: checked                                                     \\\\ Optional\n    choose_priorities:                                                                      \\\\ Optional\n    add_priority_to_case_header: false                                                      \\\\ Optional\n    add_priority_to_std_table: false                                                        \\\\ Optional\n    resolve_urls: true                                                                      \\\\ Optional\n    screenshots_url: https://gitlab_repository.url                                          \\\\ Optional\n    img_ext: .png                                                                           \\\\ Optional\n    print_case_structure: true                                                              \\\\ For debugging\n```\n\n`testrail_url`\n:   URL of TestRail deployed.\n\n`testrail_login`\n:   Your TestRail username.\n\n`testrail_pass`\n:   Your TestRail password.\n\n\u003e It is not secure to store plain text passwords in your config files. We recommend to use [environment variables](https://foliant-docs.github.io/docs/config/#env) to supply passwords.\n\n`project_id`\n:   TestRail project ID. You can find it in the project URL, for example http://testrails.url/index.php?/projects/overview/17 \u003c-.\n\n`suite_ids`\n:   If you have several suites in your project, you can download test cases from certain suites. You can find suite ID in the URL again, for example http://testrails.url/index.php?/suites/view/63... \u003c-.\n\n`section_ids`\n:   Also you can download any sections you want regardless of it's level. Just keep in mind that this setting overrides previous *suite_ids* (but if you set *suite_ids* and then *section_ids* from another suite, nothing will be downloaded). And suddenly you can find section ID in it's URL, for example http://testrails.url/index.php?/suites/view/124\u0026group_by=cases:section_id\u0026group_order=asc\u0026group_id=3926 \u003c-.\n\n`exclude_suite_ids`\n:   You can exclude any suites (even stated in *suite_ids*) from the document.\n\n`exclude_section_ids`\n:   The same with the sections.\n\n`exclude_case_ids`\n:   And the same with the cases.\n\n`filename`\n:   Path to the test cases file. It should be added to project chapters in *foliant.yml*. Default: *test_cases.md*. For example:\n\n```yaml\ntitle: \u0026title Test procedure\n\nchapters:\n    - intro.md\n    - conditions.md\n    - awesome_test_cases.md \u003c- This one for test cases\n    - appendum.md\n\npreprocessors:\n  - testrail:\n    testrail_url: http://testrails.url\n    testrail_login: username\n    testrail_pass: password\n    project_id: 35\n    filename: awesome_test_cases.md\n```\n\n`rewrite_src_files`\n:   You can update (*true*) test cases file after each use of preprocessor. Be careful, previous data will be deleted.\n\n`template_folder`\n:   Preprocessor uses Jinja2 templates to compose the file with test cases. Here you can find documentation: http://jinja.pocoo.org/docs/2.10/ . You can store templates in folder inside the foliant project, but if it's not default *case_templates* you have to write it here.\n\nIf this parameter not set and there is no default *case_templates* folder in the project, it will be created automatically with two jinja files for TestRail templates by default — *Test Case (Text)* with *template_id=1* and *Test Case (Steps)* with *template_id=2*.\n\nYou can create TestRail templates by yourself in *Administration* panel, *Customizations* section, *Templates* part. Then you have to create jinja templates whith the names *{template_id}.j2* for them. For example, file *2.j2* for *Test Case (Steps)* TestRail template:\n\n```\n\n{% if case['custom_steps_separated'][0]['content'] %}\n{% if case['custom_preconds'] %}\n**Preconditions:**\n\n{{ case['custom_preconds'] }}\n{% endif %}\n\n**Scenario:**\n\n{% for case_step in case['custom_steps_separated'] %}\n\n*Step {{ loop.index }}.* {{ case_step['content'] }}\n\n*Expected result:*\n\n{{ case_step['expected'] }}\n\n{% endfor %}\n{% endif %}\n\n```\n\nYou can use all parameters of two variables in the template — *case* and *params*. Case parameters depends on TestRail template. All custom parameters have prefix 'custom_' before system name set in TestRail.\n\nHere is an example of *case* variable (parameters depends on case template):\n\n```\ncase = {\n    'created_by': 3,\n    'created_on': 1524909903,\n    'custom_expected': None,\n    'custom_goals': None,\n    'custom_mission': None,\n    'custom_preconds': '- The user is not registered in the system.\\r\\n'\n        '- Registration form opened.',\n    'custom_steps': '',\n    'custom_steps_separated': [{\n        'content': 'Enter mobile phone number.',\n        'expected': '- Entered phone number '\n        'is visible in the form field.'\n        },\n        {'content': 'Press OK button.',\n        'expected': '- SMS with registration code '\n        'received.\\n'}],\n    'custom_test_androidtv': None,\n    'custom_test_appletv': None,\n    'custom_test_smarttv': 'None,\n    'custom_tp': True,\n    'estimate': None,\n    'estimate_forecast': None,\n    'id': 15940,\n    'milestone_id': None,\n    'priority_id': 4,\n    'refs': None,\n    'section_id': 3441,\n    'suite_id': 101,\n    'template_id': 7,\n    'title': 'Registration by mobile phone number.',\n    'type_id': 7,\n    'updated_by': 10,\n    'updated_on': 1528978979\n}\n```\n\nAnd here is an example of *params* variable (parameters are always the same):\n\n```\nparams = {\n    'multi_param_name': 'platform',\n    'multi_param_sys_name': 'custom_platform',\n    'multi_param_select': ['android', 'ios'],\n    'multi_param_select_type': any,\n    'add_cases_without_multi_param': False,\n    'checkbox_param_name': 'publish',\n    'checkbox_param_sys_name': 'custom_publish',\n    'checkbox_param_select_type': 'checked',\n    'choose_priorities': ['critical', 'high', 'medium'],\n    'add_multi_param_to_case_header': True,\n    'add_multi_param_to_std_table': True,\n    'add_priority_to_case_header': True,\n    'add_priority_to_std_table': True,\n    'add_case_id_to_case_header': False,\n    'add_case_id_to_std_table': False,\n    'links_to_images': [\n        {'id': '123', 'link': '(leading_exclamation_mark_here)[Image caption](testrail_imgs/123.png)'},\n        ...\n    ]\n}\n```\n\n`img_folder`\n:   Folder to store downloaded images if `rewrite_src_files=True`.\n\n`move_imgs_from_text`\n:   It's impossible to compile test cases with images to the table. So you can use this parameter to convert image links in test cases to ordinary markdown-links and get the list with all image links in params['links_to_images'] parameter to use in jinja template. In this case you'll have to use [multilinetables](https://foliant-docs.github.io/docs/preprocessors/multilinetables/) and [anchors](https://foliant-docs.github.io/docs/preprocessors/anchors/) preprocessors.\n\nFor example, you have 2-step test case:\n\n```\nStep 1:\n\nPress the button:\n\n(leading_exclamation_mark_here)[Button](index.php?/attachments/get/740)\n\nResult 1:\n\nDialog box will opened:\n\n(leading_exclamation_mark_here)[Dialog box](index.php?/attachments/get/741)\n\nStep 2:\n\nSelect option:\n\n(leading_exclamation_mark_here)[List of options](index.php?/attachments/get/742)\n\nResult 2:\n\nOption selected:\n\n(leading_exclamation_mark_here)[Result](index.php?/attachments/get/743)\n```\n\nMinimal *multilinetables* and *anchors* preprocessor settings in `foliant.yml` should be like this (more about *multilinetables* parameters see in [preprocessor documentation](https://foliant-docs.github.io/docs/preprocessors/multilinetables/)):\n\n```\n    - anchors\n    - multilinetables:\n        enable_hyphenation: true\n        hyph_combination: brkln\n        convert_to_grid: true\n```\n\nAfter *testrail* preprocessor process this test case, you will have `params['links_to_images']` parameter with list of image links in order of appearance to use in jinja template:\n\n```yaml\n[\n    {'id': '740', 'link': '(leading_exclamation_mark_here)[Button](testrail_imgs/740.png)'},\n    {'id': '741', 'link': '(leading_exclamation_mark_here)[Dialog box](testrail_imgs/741.png)'},\n    {'id': '742', 'link': '(leading_exclamation_mark_here)[List of options](testrail_imgs/742.png)'},\n    {'id': '743', 'link': '(leading_exclamation_mark_here)[Result](testrail_imgs/743.png)'}\n]\n```\n\nUsing this jinja template:\n\n```\n**Testing procedure:**\n\n| # | Test step         | Expected result     | Passed   | Comment                |\n|---|-------------------|---------------------|----------|------------------------|\n{% for case_step in case['custom_steps_separated'] -%}\n| {{ loop.index }} | {{ case_step['content']|replace(\"\\n\", \"brkln\") }} | {{ case_step['expected']|replace(\"\\n\", \"brkln\") }} |  |  |\n{% endfor %}\n\n{% if params['links_to_images'] %}\n*Images:*\n\n{% for image in params['links_to_images'] %}\n\u003canchor\u003e{{ image['id'] }}\u003c/anchor\u003e\n\n{{ image['link'] }}\n\n{% endfor %}\n{% endif %}\n```\n\nThe markdown result will be:\n\n```\n**Testing procedure:**\n\n+---+-----------------------------------------+----------------------------------------+--------+---------+\n| # | Test step                               | Expected result                        | Passed | Comment |\n+===+=========================================+========================================+========+=========+\n| 1 | Press the button                        | Dialog box will opened:                |        |         |\n|   |                                         |                                        |        |         |\n|   | [Button](#740)                          | [Dialog box](#741)                     |        |         |\n|   |                                         |                                        |        |         |\n+---+-----------------------------------------+----------------------------------------+--------+---------+\n| 2 | Select option:                          | Option selected:                       |        |         |\n|   |                                         |                                        |        |         |\n|   | [List of options](#742)                 | [Result](#743)                         |        |         |\n+---+-----------------------------------------+----------------------------------------+--------+---------+\n\n*Images:*\n\n\u003canchor\u003e740\u003c/anchor\u003e\n\n(leading_exclamation_mark_here)[Button](testrail_imgs/740.png)\n\n\u003canchor\u003e741\u003c/anchor\u003e\n\n(leading_exclamation_mark_here)[Dialog box](testrail_imgs/741.png)\n\n\u003canchor\u003e742\u003c/anchor\u003e\n\n(leading_exclamation_mark_here)[List of options](testrail_imgs/742.png)\n\n\u003canchor\u003e743\u003c/anchor\u003e\n\n(leading_exclamation_mark_here)[Result](testrail_imgs/743.png)\n```\n\nSo you can use links in the table to go to the correspondent image.\n\n\u003e **Important!** Anchors must differ, so if one image (with the same image id) will appear in several test cases, this image will be downloaded separately for each appearance and renamed with postfix '-1', '-2', etc.\n\nNext three fields are necessary due localization issues. While markdown document with test cases is composed on the go, you have to set up some document headers. Definitely not the best solution in my life.\n\n`section_header`\n:   First level header of section with test cases. By default it's *Testing program* in Russian.\n\n`std_table_header`\n:   First level header of section with test results table. By default it's *Testing table* in Russian.\n\n`std_table_column_headers`\n:   Semicolon separated headers of testing table columns. By default it's *№; Priority; Platform; ID; Test case name; Result; Comment* in Russian.\n\n`add_std_table`\n:   You can exclude (*false*) a testing table from the document.\n\n`add_suite_headers`\n:   With *false* you can exclude all suite headers from the final document.\n\n`add_section_headers`\n:   With *false* you can exclude all section headers from the final document.\n\n`add_case_id_to_case_header`\n:   Every test case in TestRail has unique ID, which, as usual, you can find in the header or test case URL: http://testrails.url/index.php?/cases/view/15920... \u003c-. So you can add (*true*) this ID to the test case headers and testing table. Or not (*false*).\n\n`add_case_id_to_std_table`\n:   Also you can add (*true*) the column with the test case IDs to the testing table.\n\nIn TestRail you can add custom parameters to your test case template. With next settings you can use one *multi-select* or *dropdown* (good for platforms, for example) and one *checkbox* (publishing) plus default *priority* parameter for cases sampling.\n\n`multi_param_name`\n:   Parameter name of *multi-select* or *dropdown* type you set in *System Name* field of *Add Custom Field* form in TestRail. For example, *platforms* with values *Android*, *iOS*, *PC*, *Mac* and *web*. If *multi_param_select* not set, all test cases will be downloaded (useful when you need just to add parameter value to the test headers or testing table).\n\n`multi_param_select`\n:   Here you can set the platforms for which you want to get test cases (case insensitive). For example, you have similar UX for mobile platforms and want to combine them:\n\n```yaml\npreprocessors:\n  - testrail:\n    ...\n    multi_param_name: platforms\n    multi_param_select: android, ios\n    ...\n```\n\n`multi_param_select_type`\n:   With this parameter you can make test cases sampling in different ways. It has several options:\n\n- *any* (by default) — at least one of *multi_param_select* values should be set for the case,\n- *all* — all of *multi_param_select* values should be set and any other can be set for the case,\n- *only* — only *multi_param_select* values in any combination should be set for the case,\n- *match* — all and only *multi_param_select* values should be set for the case.\n\nWith *multi_param_select: android, ios* we will get the following cases:\n\n| Test cases  | Android | iOS | PC | Mac | web |   | any | all | only | match |\n|-------------|:-------:|:---:|:--:|:---:|:---:|---|:---:|:---:|:----:|:-----:|\n| Test case 1 |    +    |  +  |    |     |     |   |  +  |  +  |  +   |   +   |\n| Test case 2 |    +    |  +  |    |     |     |   |  +  |  +  |  +   |   +   |\n| Test case 3 |         |     | +  | +   |     |   |     |     |      |       |\n| Test case 4 |         |  +  | +  | +   |     |   |  +  |     |      |       |\n| Test case 5 |    +    |  +  |    |     |  +  |   |  +  |  +  |      |       |\n| Test case 6 |    +    |  +  |    |     |  +  |   |  +  |  +  |      |       |\n| Test case 7 |         |     | +  | +   |  +  |   |     |     |      |       |\n| Test case 8 |         |     | +  | +   |  +  |   |     |     |      |       |\n| Test case 9 |         |  +  |    |     |     |   |  +  |     |  +   |       |\n\n`add_cases_without_multi_param`\n:   Also you can include (by default) or exclude (*false*) cases without any value of *multi-select* or *dropdown* parameter.\n\n`add_multi_param_to_case_header`\n:   You can add (*true*) values of *multi-select* or *dropdown* parameter to the case headers or not (by default).\n\n`add_multi_param_to_std_table`\n:   You can add (*true*) column with values of *multi-select* or *dropdown* parameter to the testing table or not (by default).\n\n`checkbox_param_name`\n:   Parameter name of *checkbox* type you set in *System Name* field of *Add Custom Field* form in TestRail. For example, *publish*. Without parameter name set all of cases will be downloaded.\n\n`checkbox_param_select_type`\n:   With this parameter you can make test cases sampling in different ways. It has several options:\n\n- *checked* (by default) — only cases whith checked field will be downloaded,\n- *unchecked* — only cases whith unchecked field will be downloaded.\n\n`choose_priorities`\n:   Here you can set test case priorities to download (case insensitive).\n\n```yaml\npreprocessors:\n  - testrail:\n    ...\n    choose_priorities: critical, high, medium\n    ...\n```\n\n`add_priority_to_case_header`\n:   You can add (*true*) priority to the case headers or not (by default).\n\n`add_priority_to_std_table`\n:   You can add (*true*) column with case priority to the testing table or not (by default).\n\nUsing described setting you can flexibly adjust test cases sampling. For example, you can download only published *critical* test cases for both and only *Mac* and *PC*.\n\nNow strange things, mostly made specially for my project, but may be useful for others.\n\nScreenshots. There is a possibility to store screenshots in TestRail test cases, but you can store them in the GitLab repository (link to which should be stated in one of the following parameters). GitLab project should have following structure:\n\n```\nimages/\n├── smarttv/\n|   ├── screenshot1_smarttv.png\n|   ├── screenshot2_smarttv.png\n|   └── ...\n├── androidtv/\n|   ├── screenshot1_androidtv.png\n|   ├── screenshot2_androidtv.png\n|   └── ...\n├── appletv/\n|   ├── screenshot1_appletv.png\n|   ├── screenshot2_appletv.png\n|   └── ...\n├── web/\n|   ├── screenshot1_web.png\n|   ├── screenshot2_web.png\n|   └── ...\n├── screenshot1.png\n├── screenshot2.png\n└── ...\n```\n\n*images* folder used for projects without platforms.\n\nFilename ending is a first value of *multi_param_select* parameter (*platform*). Now to add screenshot to your document just add following string to the test case (unfortunately, in TestRail interface it will looks like broken image link):\n\n```\n(leading exclamation mark here!)[Image title](main_filename_part)\n```\n\nPreprocessor will convert to the following format:\n\n```\nhttps://gitlab.url/gitlab_group_name/gitlab_project_name/raw/master/images/platform_name/main_filename_part_platform_name.png\n```\n\nFor example, in the project with *multi_param_select: smarttv* the string\n\n```\n(leading exclamation mark here!)[Application main screen](main_screen)\n```\n\nwill be converted to:\n\n```\n(leading exclamation mark here!)[Application main screen](https://gitlab.url/documentation/application-screenshots/raw/master/images/smarttv/main_screen_smarttv.png)\n```\n\nThat's it.\n\n`resolve_urls`\n:   Turn on (*true*) or off (*false*, by default) image urls resolving.\n\n`screenshots_url`\n:   GitLab repository URL, in our example: https://gitlab.url/documentation/application-screenshots/ .\n\n`img_ext`\n:   Screenshots extension. Yes, it must be only one and the same for all screenshots. Also this parameter used to save downloaded images from TestRail.\n\nAnd the last one emergency tool. If you have no jinja template for any type of TestRail case, you'll see this message like this: *There is no jinja template for test case template_id 5 (case_id 1325) in folder case_templates*. So you have to write jinja template by yourself. To do this it's necessary to know case structure. This parameter shows it to you.\n\n`print_case_structure`\n:   Turn on (*true*) or off (*false*, by default) printing out of case structure with all data in it if any problem occurs.\n\n\n## Usage\n\nJust add the preprocessor to the project config, set it up and enjoy the automatically collected test cases to your document.\n\n\n### Tips\n\nIn some cases you may encounter a problem with test cases text format, so composed markdown file will be converted to the document with bad formatting. In this cases *replace* preprocessor could be useful: https://foliant-docs.github.io/docs/preprocessors/replace/ .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoliant-docs%2Ffoliantcontrib.testrail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoliant-docs%2Ffoliantcontrib.testrail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoliant-docs%2Ffoliantcontrib.testrail/lists"}