Thread

Skip Navigation LinksForums > SpiraTeam Forums > SpiraTeam Issues & Questi... > Integrated Rapise Tests a...

Integrated Rapise Tests and Parameterisation RSS Feed

Thursday, November 17, 2011
Hi Inflectra,

I have a conundrum. I have successfully been able to parameterize Rapise tests using Excel as mentioned in the Rapise documentation. However, now I'm wanting to integrate this with SpiraTeam, the ST documentation tells me that I parameterise my tests per test instance within ST. It defines some code for identifying a default value for variables that receive no input from ST but not how or where I place this inside my script.

So we have two methods. One - read from excel. Two - read from ST.

Which method should I implement for integration with ST and if the second, then how do I change my excel parameterized script into an ST parameterized script?

Thanks again,

ROAMES.
2 Replies
Adam SAdam S
re: Nick v on Thursday, November 17, 2011
Wednesday, November 23, 2011

Hi Nick

Any global variable inside Rapise can be passed a value from SpiraTest (in the test set). The Library Information System sample project in Rapise shows an illustration of this.

Since SpiraTest only supports lower-case parameters, make sure the Javascript variable names in Rapise are all lower case.

The choice whether to use SpiraTest or Excel to parameterize your tests is up to you. The advantage of Excel is that it's easier to manage large tables of test data (at least currently). SpiraTest allows you to write a generic test in Rapise and have less technical users pass different values to that test using the web interface of SpiraTest. So on balance:

  • Excel - better for large data tables
  • SpiraTest - easier to split work between test script coder and QA designers

If you have code written using Excel:

Spreadsheet.DoAttach('searchterms.xls', 'Sheet1');
// Go through all rows
while(Spreadsheet.DoSequential())
{
  // Read cell value from column 0
  var term = Spreadsheet.GetCell(0);
  // Pass it into Logic function
  Logic(term);
}

Then to switch over to SpiraTest you'd create a Test Set and add the same Test Case for each specific instance of the test (i.e. each row in Excel) and set the parameter values of the test.

Then inside Rapise you'd use simple variables such as:

 if ('undefined' == typeof(g_term))
 {
  g_term = 'value if not called from SpiraTest';
 }
 Logic (g_term);

Since the looping is done by RapiseLauncher and SpiraTest (based on the Test Set) not by Rapise itself.

Nick vNick v
re: Adam S on Wednesday, November 23, 2011
Wednesday, November 23, 2011
Awesome explanation. Very clear now. Thank you so much :)
Tagged
Statistics
  • Started: 11/17/2011
  • Last Reply: 11/23/2011
  • Replies: 2
  • Views: 791
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.