Test Outline to TestLink converter released on GitHub

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
avleaf
TestLink user
Posts: 2
Joined: Wed Jul 27, 2011 7:18 pm

Test Outline to TestLink converter released on GitHub

Post by avleaf »

Hello TestLink users,

Our test team likes to create test outlines and plans in plain old text. We have lots of vim users here.

I found that I was taking too much time to insert a test plan into TestLink, so I came up with a faster way that worked for our team. At the suggestion of management, I've thrown our project on GitHub.

This is, without a doubt, a work in progress, but it's functional and in-use in a production environment. It may not fit everyone's personal work style, but it works great for me and my co-workers.

https://github.com/avleaf/Test-Outline- ... verter.php

Code: Select all

./TestOutlineConverter.php <INFILE> <OUTFILE>
Test Outline Converter uses the first two characters in a line to determine what kind of testcase element the line is. Always follow a key with a space.

When creating a plain text test plan, preface each line with one of the following keys:

'+ ' Starting a line with '+ ' creates a test case
'- ' '- ' Denotes a Test Step
'= ' '= ' Denotes Expected Results. If no associated step exists, a blank step is created.
[comments]
Both C-style (two consecutive slashes '//') and shell-style ('# ') comments are allowed.

[no line prefix]
No Line prefix means it will get entered into the Test Case 'Summary' in Test Link.

[blank lines]
Blank lines will be ignored.

Sample Test Plan:

Code: Select all

+ Test Case Name
	Summary line1
	"Continued Summary"
	More Summary
		- Test Step 1
			= Expected 1	
		- Test Step 2
			= Expected 2
+ Test Case Name2
// This line will be commented out
#  So will this line
	- Test Step 1
		= Expected 1a
		= Expected 1b
	- Test Step 2
		= Expected 2
After being run through TestOutlineConverter becomes:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<testcases>
 <testcase name="Test Case Name">
    <summary>Summary line1
"Continued Summary"
More Summary
    </summary>  
  <steps>
  <step>
    <step_number>1</step_number>
      <actions>Test Step 1</actions>
      <expectedresults>Expected 1</expectedresults>
    </step>
  <step>
    <step_number>2</step_number>
      <actions>Test Step 2</actions>
      <expectedresults>Expected 2</expectedresults>
    </step>
  </steps>
  </testcase>
 <testcase name="Test Case Name2">
  <steps>
  <step>
    <step_number>1</step_number>
      <actions>Test Step 1</actions>
      <expectedresults>Expected 1a</expectedresults>
    </step>
  <step>
    <step_number>2</step_number>
      <actions></actions>
      <expectedresults>Expected 1b</expectedresults>
    </step>
  <step>
    <step_number>3</step_number>
      <actions>Test Step 2</actions>
      <expectedresults>Expected 2</expectedresults>
    </step>
  </steps>
  </testcase>
</testcases>
asgzl
Advanced user
Posts: 19
Joined: Fri May 28, 2010 3:22 am

Re: Test Outline to TestLink converter released on GitHub

Post by asgzl »

Dear avleaf,

Thanks so much for the sharing, I think the script is pretty useful.
In my case, both test summary and test step/result will probably have multiple lines, is it possible that the script be adapt to support multiple lines?

Thanks again,
Post Reply