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

Import csv with configuration file should maintain mapping even if csv columns were reordered


Let’s suppose you have a CSV file (CSV1) with the following columns:

  • A
  • B
  • C

and you have a configuration mapping (CM1) associated to the above CSV file with all cell mappings for each column (eg: a1 value in column A mapped with A1 on testrail, c1 value in column C mapped with C1 on testrail and so on).

If you reorder the CSV file columns (eg: A,B,C -> B,C,A) the configuration mapping CM1 is not more usable because you’ll get wrong mapping cell values (eg: c1 -> A1 on column 1). It seems that the configuration mappings work as positional mapping and ignores column names.


  • using column names as keys, we could be able to use the same configuration mapping even if imported CSV has a different column order (but same column names).


Hi David,

Thank you for the post. TestRail when using its configuration file does have a set order it is expecting the CSV to be in. Normally the order of columns would not change and we have found that most customers find this to not be an issue as they do not typically change their column order. If you do change the order, it does take just a few minutes to configure the new column mappings and save a new configuration file.

That being said, we would be happy to look into the possibility of enhancing the way we are mapping the columns in our configuration file.