html methods parameters list does not corespond to xml file

Bug #534574 reported by Milan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit-Results
Triaged
High
Charlie Poole

Bug Description

Hi,

If one use parametrizied Unit test with the following attributes(probably holds for every
parametrizied unit test):

[Test, Sequential, Category("testable"), Description("WriteReadTest")]

in XML log file is written correctlly names and values of all input variables, but only the last
parameter is showed in the .HTML file produced by nunit-results-1.1-bin reporting tool. Since
NUnit GUI has some refresh issues I am currentlly using HTML files in order to debug which unit
test went wrong, so I am missing VERY important information about set of parameters used by failed
unit test. Also formating of HTML file is strange because every new word is written in the new
line, there is no automatic resizing of the HTML text according to the size of HTML windows.

Pseudo C# code could be:

        [Test, Sequential, Category("testable"), Description("WriteReadTest")]
        public void WriteReadMultiplyTestCaseToMultipleXxxCouplesTest
 (
                        [Values(
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb"
                                )]
                            string sParentTable,

                    [Values(
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb"
                            )]
                            string sChildTable,
                    [Values(
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb"
                            )]
                            string sAddParentToChildAssoc,

                    [Values(
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb",
                            "bbbbbbbbbbbbbbbbbbbbbbbbbbb"

                            )]
                string sListVSVariable,

                    [Values(
                            "cccccccccccccccccccccccccccccccccc",
                            "cccccccccccccccccccccccccccccccccc",
                            "cccccccccccccccccccccccccccccccccc",
                            "cccccccccccccccccccccccccccccccccc",
                            "cccccccccccccccccccccccccccccccccc",
                            "cccccccccccccccccccccccccccccccccc",
                            "cccccccccccccccccccccccccccccccccc"
                            )]
                string sRetreiveAssociatedEntityMethod

            )

In HTML report in case of Assert.Fail() would be just last parameter "cccccccccccccccccccccccccccccccccc" displayed.

Br,
Milan.

Revision history for this message
Charlie Poole (charlie.poole) wrote :

This isn't exactly a duplicate, but is simply one more manifestation of bug #491548. So long as we use NUnit 2.2.10 to load the result files, this cannot be fixed, because NUnit 2.2.10 has no notion of parameters. So this has to wait for a 2.0 release, which will stand on its own without that dependency.

Changed in nunit-results:
status: New → Triaged
milestone: none → 2.0
importance: Undecided → High
Revision history for this message
Milan (milan-vukoslavcevic) wrote :

Additional parameter related to this bug report are:
NUnit 2.5.2.9222 producing XML report
and
nunit-results-1.1-bin for producing HTML report.

Revision history for this message
Milan (milan-vukoslavcevic) wrote :

I need here explanation please! What does it means:
"So long as we use NUnit 2.2.10 to load the result files" ?
I am using nunit-results-1.1-bin for loading XML and producing HTML, so I am not using NUnit to load result file ? Is XML file result file ?

Revision history for this message
Charlie Poole (charlie.poole) wrote :

Yes, the XML file discussed here is the result file - default name TestResult.xml.

Have you examined bug #491458? NUnit-Results uses several NUnit dlls to load the file. Those are from NUnit 2.2.10 and have never been changed. To change is not trivial but it's necessary in order to recognize features that did not exist in that old version of NUnit.

Ideally, we should not depend on _any_ version of NUnit, but look at the XML file directly. Because this is a major design change, I have marked it for a 2.0 release, as well as any bugs that depend on it.

Revision history for this message
Milan (milan-vukoslavcevic) wrote :

ok,
it is about bug #491548 and not bug #491458 :)

NUnit and nunit-result files are in separated directories so they should not influence each others.

but anyway I found out that exact problem exist only when some of the [Sequential] parameters is having "." in itself so complete list of parameters before parameter with "." will not be displayed in HTML report. Character "." and rest of parameter will be shown.
When [Sequential] parameters does not have character "." it works ... almost like charm :)

Sequential parameters (first parameter is in details given...others in pseudo code) are passed like in example:

[Values("Tbl_aaaaaa", "Tbl_eeeeeeeee",)] string sParentTable,
 second parameter,
 third...

Revision history for this message
Milan (milan-vukoslavcevic) wrote :

In original bug report that means that the last parameter had "."

"cccccccccccc.ccccccccccccccccccccc",

so it will be shown "ccccccccccccccccccccc" and before "." not.

Revision history for this message
Charlie Poole (charlie.poole) wrote :

OK, maybe this is not related to #491548. What is in the XML file? Can attach an example XML file that produces this problem?

Revision history for this message
Milan (milan-vukoslavcevic) wrote :

Here in attachment is XML which kane produce wrong HTML parameter report.

Here is also C# test code which will produce given XML file.
        [Test, Sequential, Category("testable"), Description("WriteReadTest")]
        public void BugTest
        (
                    [Values(
                            "aaaaaaaaaaaaaaaaa",
                            "aaaaaaaaaaaaaaaaa",
                            "aaaaaaaaaaaaaaaaa"

                            )]
               string sFirstParam,
            [Values(
                            "cccccccccccccccccccccccccccccc.cccc",
                            "ccccccccccccccccc.ccccccccccccccccc",
                            "ccccc.ccccccccccccccccccccccccccccc"
                            )]
               string sSecondParam)
        {
            Assert.Fail();
        }

Changed in nunit-results:
assignee: nobody → Charlie Poole (charlie.poole)
milestone: 2.0 → 1.2
Revision history for this message
Charlie Poole (charlie.poole) wrote :
Changed in nunit-results:
milestone: 1.2 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.