It's all about the answers!

Ask a question

Extracting test case from Excel using rqmexcelimporter and FindCell()


Jörg Werner (3033781) | asked Jan 09 '15, 4:07 a.m.
Hello,

I try to import test cases from Excel. This works quite fine, only the Find*() functions are not working

Example:
testcase.dc:title=FindCell("Title") + (0,1)
After import In RQM the title field contains "Title". It seems that "+ (0,1)" is ignored.

If I specify a string which can not be found in the excel sheet (e.g. Titlex) I get:
Getting artifacts from document - "UnitTestCases.xls".....
Error: Configuration File, Line 31, In the FindCell function, the search string "Titlex" was not found.
Error: Configuration File, Line 31, Found a value that reduced to "1", but was expecting a value equivelant to a column, cell, or literal.

*** Exporting Aborted: Errors found! ***

that means the importer understands the function FindCell() :-)

Another side effect is that not the exact string is searched. In the above example I had also another Cell with text "Tile:". FindCell("Title") did return "Title:". Is there a description how FindCell searches?

But most important: what is the correct syntax?  " + (0,1)" at least is ignored :-(!

  Thanks, Joerg



___________________________________
the documentation for the feature in "excel Migration configuration.doc" is:

...

Constants can also be added to the function calls.

So FindRow(“Data that is in the second row”) + 1 would return 3

Also FindCell(“Data that is in A1”) + (1, 1) would return B2.

Lastly if you just add one number to a FindCell it adds it to the row. For Examaple FindCell(“Data of A1”) + 1 would return A2.

The related sample xls/cfg files are titled “Requirements 001 with dynamic directive setting.”

...




One answer



permanent link
Reshma Ratnani (1.1k1) | answered Jan 09 '15, 6:25 a.m.
JAZZ DEVELOPER
Hi Jorg,

Your requirement is to get the value from cell below the cell having value "Title". You can achieve that by using below syntax.

testcase.dc:title=FindCell("Title") + 1



Comments
Jörg Werner commented Jan 09 '15, 6:31 a.m.

Hi Reshma,

my requirement is to get the value right from the cell. Hence + (0,1)

I also tried "+ 1" but this does also not work and returns the string itself, i.e. "Title"

 

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.