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

Numbering list for Steps field in Test Cases


#1

Hi,

I like to have my steps to look like this:

  1. Step 1
  2. Step 2
  3. Step 3

I am used to using the # sign in Jira when I want to have a list of steps with a number automatically assigned to each step by starting the step with # sign. So if I miss a step, I can just insert a line with # sign in front without changing anything else.

In Markdown syntax, # sign does not behave the same way as in Jira, so I have to use number followed by a period for my numbered lists. What if I missed a step in my list of steps? Currently I need to insert the step and then re-number all the subsequent steps, is there a better way to do it?

Thanks,
Phil


#2

Hello Philippe,

Thanks for your posting. Yes, there is an easier way. You can just use the following syntax:

  1. First step
  2. Second step
  3. Third step

And Markdown/TestRail will automatically display this with the correct indexes. I hope this helps.

Regards,
Dennis


#3

Thanks!!


#4

Hi Dennis,

The problem that I am encountering now is when I export the test suite, the steps will be exported as 1., 1., 1. … instead of the displayed format.

Is there a way around this?

Thanks,
Phil


#5

Hello Phil,

Thanks for the update. There’s unfortunately currently no workaround for this as the export outputs the data as entered by the user. We will consider this for a future update though and I’ve just added it to our feature request list.

Regards,
Tobias


#6

Hi Phil,

The reason for this is that the exported data is the “raw” Markdown format. If you plan to process the export files with a custom script you could also use a Markdown library to generate the formatted output (such a library is available for almost all programming tools). Otherwise I would just recommend entering the steps with 1., 2., 3. etc. so your export files would have the correct ordering, and TestRail would still show the listed items correctly.

I hope this helps.

Thanks,
Dennis


#7

What about nesting? In normal markdown, you’d do it like this:

1. first item
2. second item
3. third item
    1. first nested item (3.1)
    2. second nested item (3.2)
    3. third nested item (3.3)

In my hosted instance, the numbering restarts from 1 with the nested block but the block itself is not indented:

  1. first item
  2. second item
  3. third item
  4. first nested item (3.1)
  5. second nested item (3.2)
  6. third nested item (3.3)

#8

Hello Ian,

Thanks for your posting. You would need to indent nested lists with four whitespaces and this looks as follows:

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

I hope this helps!

Regards,
Tobias


#9

The problem appears to be an edge case.

This works fine:

Text before list

1. first item
2. second item
3. third item
    1. first nested item (3.1)
    2. second nested item (3.2)
    3. third nested item (3.3)

This exposes the error.

Text before list, note lack of newline separating it from the list.
1. first item
2. second item
3. third item
    1. first nested item (3.1)
    2. second nested item (3.2)
    3. third nested item (3.3)

#10

Thanks for the update, Ian. Markdown requires an empty line before lists and would not recognize the list otherwise. You can see that the second example is not rendered as a full list (and as standard text) because the left margin is different from the list view.

Regards,
Tobias


#11

I am using Test Case (Text) template while writing the test case.

how can i get numbered list in Test Steps.

  1. Enter the User Name
  2. Enter the Password


#12

Can i get an update for this ?