After I built the TRX to html report generator, there was a little obvious need to have it centrally available so that team members can upload the results to a central place and manager(s) and PMs can view them. The requirement was a web-based report viewer. I could have built it using the same old tool with some web-pages to give links to the reports, but I also wanted to take out the tester's dependency to have the html generator tool. I turned to develop a simple web-app to do the job.
In the first apporach, I started like a newbie and started using the datagrid to display information out of result TRX. The upload part for easy and I am not going to talk about that here. I had to write quiet some code to parse the TRX again using XPATHs before I passed that to the datagrid to take care of the presentation. It was taking more time than what I was expecting, so I took a different approach, I turned to use LINQ to XML (basically to get away from parsing!)
LINQ to XML did the job, it saved my time from parsing XMLs and made it as easy as writing SQL queries against them. You will need 2 more namespaces
Here are 2 small class that I wrote to get the data out of TRXs using LINQ, you can have functionality, this is just to give you an idea!
The output with some basic UI components looks like this,

Of course, what you see as test1.xml will be the trx file uploaded by the tester.
Here is presentation layer code (not including the aspx code as I have used all the default properties),
LINQ to XML did the job, it saved my time from parsing XMLs and made it as easy as writing SQL queries against them. You will need 2 more namespaces
Here are 2 small class that I wrote to get the data out of TRXs using LINQ, you can have functionality, this is just to give you an idea!
The output with some basic UI components looks like this,

Of course, what you see as test1.xml will be the trx file uploaded by the tester.
Here is presentation layer code (not including the aspx code as I have used all the default properties),
( 0 Votes )
| Comments |
|
Only registered users can write comments!
Powered by !JoomlaComment 4.0alpha3



























