Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

How to change the font style in the Create and Edit Test Case forms?


#1

We use TestRail across most of our Products while adopting BDD testing.
When we started using TestRail there were monospaced fonts in both Crate and Edit test case views, however after that the font style on Edit was changed to what we have at the moment while Create stayed unchanged. A while ago Create test case also changed.

May I ask you how to customise the font style on these pages, so we can use monospaced fonts again please?

Thank you!
Monica


#2

Hello Monica,

Do you have a screenshot for this? You can use a monospaced font style in TestRail’s rich-text fields via the following syntax:

http://docs.gurock.com/testrail-userguide/userguide-editor#code_and_preformatted_text

If you also want to change the font in the text boxes (on the edit/create form), you can implement this with a simple UI script and I’m happy to provide an example for this.

Cheers,
Tobias


#3

Thank you Tobias - can you please provide a sample UI script I can use in the Administration panel?

Thank you!

Kind Regards,
Monica


#4

Hello Monica,

yep, sure. Please see the following UI script for this (can be added under Administration > Customizations):

name: Change the font style to monospaced on case form
description: Changes the font style to monospaced on case form
author: Gurock Software
version: 1.0
includes: ^cases/(add|edit)
excludes: 

css:
textarea {
    font-family: Consolas, Menlo, "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Courier New, monospace !important;
}

This changes the text boxes to monospaced on the Add/Edit case forms.

Cheers,
Tobias


#5

Thank you Tobias - it works just fine and does the job.

Kind Regards,
Monica


#6

Hello Monica,

That’s great to hear, happy to help :slight_smile:

Cheers,
Tobias