10-14-2015 04:53 AM
Hi,
i am currently working in NI DIADEM to parse my test reports into Database. for that i have created my dataplugins using VBScript. Now i want to read the below line from my test report.
3.5.8 ABCCompany Current 5.957 milliA GT 0.025 LT 20 GO
i have created my RegEXP object and pattern as given below to read similar type of lines.
"((.{6})\s(.+)\{(.+)\}\s(.{11})(.{5}))"
Is anything wrong in my pattern?
thanks,
Shruthi
10-14-2015 10:28 AM
Without knowing what the pattern is supposed to do, it's hard to tell whether its OK or not. Could you please provide some more details like whether you are using it from within a DataPlugin, which part of the test report line you want to parse using the pattern, how much the report lines differ from each other..
10-15-2015 02:49 PM
Hi kalpana,
Additionally, when you say "database", do you mean the NI DataFinder, or do you mean some external relational SQL data base?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
10-26-2015 12:12 PM - edited 10-26-2015 12:13 PM
Hi kalpana1993,
That line looks like a tab separated file. I tested your regular expression in a regex tester and it wasn't working correctly, at least on my end.
I know you might be set in your mind to use regular expression for this case. But, perhaps you should consider spliting by space or tab ?
As far as I see the pattern of that line is traduced as: Test Sequence, Test Name, Test Result, Units, Operator 1, Upper Limit, Operator 2, Lower Limit and Test Status (that is if they respect that pattern through out the test report, for example if they skip an operator you might have problems but you can still control that). With that knowledge you can create your own internal headers and parse the data creating the respective properties or so.
My 2 cents. Hope you find a solution.