Integrated Rapise Tests and Parameterisation

Thursday, November 17, 2011 5:54:08 AM
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,

2 Replies
Wednesday, November 23, 2011 5:28:57 PM
re: ROAMES on Thursday, November 17, 2011 5:54:08 AM

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
  // Read cell value from column 0
  var term = Spreadsheet.GetCell(0);
  // Pass it into Logic function

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.

Wednesday, November 23, 2011 11:38:51 PM
re: inflectra.adam on Wednesday, November 23, 2011
Awesome explanation. Very clear now. Thank you so much :)
  • Started: Thursday, November 17, 2011 5:54:08 AM
  • Last Reply: Wednesday, November 23, 2011 11:38:51 PM
  • Replies: 2
  • Views: 836