Hi,
I'm trying to export test cases from Ranorex to TestRail, but getting only id and title without a Description in Test Rail test suite.
Is there any work around to get Description as well?
How to export additional columns from Ranorex to TestRail
How to export additional columns from Ranorex to TestRail
You do not have the required permissions to view the files attached to this post.
Re: How to export additional columns from Ranorex to TestRail
Hi,
As far s I know, in TestRail there does not exist something like a "description" field for test cases.
Therefore, Ranorex can't export a TestCase description.
regards, qwetzu
As far s I know, in TestRail there does not exist something like a "description" field for test cases.
Therefore, Ranorex can't export a TestCase description.
regards, qwetzu
Re: How to export additional columns from Ranorex to TestRail
I am also having similar issue. If someone can help that would be great.
Regards.
Shane.
Re: How to export additional columns from Ranorex to TestRail
I wrote a code, that converts description into a title and after that ran integration tool with testrail.
Note: each TestCase should have a description, otherwise null exception.
Or you can handle it by editing the following code
Note: each TestCase should have a description, otherwise null exception.
Or you can handle it by editing the following code
Code: Select all
using System.Xml;
using System.Xml.Linq;
{
XmlDocument xml = new XmlDocument();
string path = @"C:\path_to_your_project\you_test_suite_name.rxtst";
xml.Load(path);
var children = xml.SelectNodes("testsuitedoc/testsuiteentryhierarchy/flatlistofchildren/testcase");
XmlCDataSection cData;
foreach(XmlNode child in children){
Report.Info(child.Attributes[1].Value);
cData = child.SelectSingleNode("description").OfType<XmlCDataSection>()?.First();
string desc = cData.Value;
desc= Regex.Replace(desc, "\\[.*\\]", String.Empty).TrimStart().TrimEnd();
desc= Regex.Replace(desc, "<.*?>", String.Empty);
desc= desc.Replace("\r", String.Empty);
desc= desc.Replace("\n", String.Empty);
desc= Regex.Replace(desc, "&.*?;", String.Empty);
child.Attributes[1].Value = desc;
}
xml.Save(@path);
}