My imported test cases have lost their newlines!

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
daveg
TestLink user
Posts: 3
Joined: Thu Jul 31, 2008 6:13 pm

My imported test cases have lost their newlines!

Post by daveg »

Hi TestLink Masters!
Hopefully this is an easy question for you.
We have a few thousand test cases to import into TestLink.
(so I can't hand-fix this problem in our Excel file)

My XML map looks good (see bottom) and export/import was smooth.
But all my newlines are getting clobbered.


Here's the way it looks in Excel:
Go to Dashboard
----------------------------
1. Switch to different page, such as tracking, message, job etc
2. Check the page setup name


Here's the way it imports into TestLink:
Go to Dashboard ---------------------------- 1. Switch to different page, such as tracking, message, job etc 2. Check the page setup name

YOU SEE THE IMPORTED CEL CONTENTS ARE ALL RAN TOGETHER ON 1 LINE!


Test Steps are almost always broken up on separate lines so surely there's a way to export/import this over and look correct.
Please say it's so....

Can someone help me? (thanks!)
-Dave

Here's my XML map/file:
<?xml version="1.0" encoding="UTF-8"?>
<testcases>
<testcase name="">
<summary></summary>
<steps></steps>
<expectedresults></expectedresults>
</testcase>
<testcase name="">
<summary></summary>
<steps></steps>
<expectedresults></expectedresults>
</testcase>
</testcases>
havlatm
Member of TestLink Community
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Post by havlatm »

Convert your newlines to <br /> tag. That's behavior of html.
daveg
TestLink user
Posts: 3
Joined: Thu Jul 31, 2008 6:13 pm

Post by daveg »

havlatm wrote:Convert your newlines to <br /> tag. That's behavior of html.
Hi hav. Awesome!
That got me going in the right direction.

I'm now using the following formula in Excel to combine the two columns (E & F separated by a dashed line) AND also ensure that all newlines found within the cels are replaced with <br>

=SUBSTITUTE((E2&"<br>"&"----------------------------"&"<br>"&F2), CHAR(10),"<br>")



Now my output looks like this:
Go to Dashboard<br>----------------------------<br>1. Switch to different page, such as tracking, message, job etc<br>2. Check the page setup name

Thanks for the reply!
gk1981
Advanced user
Posts: 20
Joined: Wed Sep 24, 2008 8:59 am

Post by gk1981 »

Here's a sample XML file that preserves newlines when uploaded to Testlink.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testcases>
<testcase name="1">
<summary>Check whether the login screen color is been changed to Brand New format</summary>
<steps>1. Login to the application<br />2. Check the Login screen color</steps>
<expectedresults>Old Layout: The login screen color was in green color combination.Refer: Old Layout Login Screen.JpegNew Layout: The login screen color should be in blue color combination.Refer: New Layout Login Screen.Jpeg</expectedresults>
</testcase>
</testcases>
Hope this helps!
Post Reply