NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Requierements Gateway Referencing to Step's Id

Solved!
Go to solution

Hi

 

I have almost written a NIRG Type to NI-TestStand's old XML-Reportformat.

http://forums.ni.com/t5/NI-TestStand/Requirements-Gateway-and-XML-Reports/m-p/2180354/highlight/true...

 

At the moment there is "simple" Challange. In my XML reportfile there is a leading Whitespace inside a StepId-tag.

<StepId> ID#:rLdC0wzTCEmL7Hz/UyvgLD</StepId>

 

Is it possible to place a regular expression to getrid of it ?

Screen1.JPG

 

 

At the moment i have modified the requirement inside Teststand-type with Identifier Format:" \1", this works but

of course the external link to the TestStand-Step fail....

 

Regards

 

Juergen

 

     

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 1 of 7
(3,937 Views)

Dear Mr Juergen,

 

Can you explain us where is exactly the problem and where is the files to reproduce or Test your Requirement?

 

What do you mean with the external Link to Teststand fail?

 

Thanks.

 

Best Regards

Kais Mekacher
Applications Engineer
Germany - Munich
0 Kudos
Message 2 of 7
(3,918 Views)

Hi Kais,

 

I try to explain it more abstract.

 

Inside TestStand there is a Step "abc" with StepId: "ID_HelloWorld"

When you run the stuff TestStand will generate a Xml-Report where this StepId is " ID_HelloWorld"  ! Unfortunately there is always a leading white space on all Reports StepIDs.

 

Now lets go to NIRG.

If you like to analyse TS-SequnceFile and TS-Report you have link them. This will fail here, because the strings do not match.

 

Desired behaviour is to get rid of the leading WS in report type (See upper screenshot). So NIRG stores the ID inside without the WS. Now you should be able to link to the TS.

 

Workround: You are able to add the WS before itis stored in NIRG TS-SequenceType (NOT the report!! one) Now linking will work, too

But: There is nice feature in NIRG!! If you double click a step in NIRG, TS will be launched and jumps to this step in the sequencefile.

this will never work because my called step has a leading ws now.

 

Now i need to now: Is there a possibility with regex to remove WS before they are stored as "T"arget.

 

Regards

 

Juergen

 

 

 

 

 

 

 

 

 

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 3 of 7
(3,915 Views)

Juergen,

 

afaik, NIRG uses "regular expressions". So it should be possible to use wildcards to "exclude/introduce" certain symbols. Without having performed any test, i cannot state the exact symbol for wildcard "exactly one character", it is most likely '.' (see here).

 

Another question which comes to my mind:

Why is the white space part of the StepID at all? It sounds like it is coming from the report generation, which can be modified. Depending on the way of reporting, you can change the string generation as whole or simply catch the string before written to XML and Search/Replace the string "StepID: " with "StepID:" (first got the white space after ':').

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 7
(3,906 Views)

HI Norbert,

 

Thanks for replying.

According to the documentation it should be possible. In fact in my workaround i am adding a sign to the idstring. this done in the

identifer format by " \1". So the solution should be found in this edit control. Everytime when i am placing a regex string there it will be pre-added
to the id. Only \1 will place my Id. I do not really know how to place a regex there. And how it is managed internally. This could only explain the developer.

 

I agree. If there is noway to getrid of the WS. I will delete it the reportgenerator of course.

but were are using this generator for more than ten years now in the productionfield and development.

I do not know the total number of reports, it must be HUGE!
I think you can imagine that i am not amoused to change the generator.

 

Maybe you can talk to the developer to get some internal details of the "Indentifier Format".

 

Thanks und

Viele Grüsse vom Bodensee nach München

 

Jürgen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 5 of 7
(3,902 Views)

Hi,

 

My understanding is that you want to trim the first white space of the stepID  if so, you can try "^[ \t]+".  It is searching for the WS in the head of the content and replace with nothing. 

 

If it doesn't match your requirement, please let me know.

 

Regards,

HaiJun

0 Kudos
Message 6 of 7
(3,883 Views)
Solution
Accepted by topic author j_dodek

Hi

 

I have found the solution "(\S.*)" to trim ws. Infact this sounds very easy. The most important thing is that the breakets "()" were

pleaced for grouping! without them NOTHING is working. the \1 in the Indentifier format is optional here. You need it if you have placed more 

than one group.

 

Screen1.JPG

 

Regards

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 7 of 7
(3,869 Views)