column-types in report tests definable?

Sep 18, 2014 at 12:28 PM
Dear Seddryck,

in a report-test is it possible to set the column data types?

In a report dataset-test I have a result set which has a text in the second column (a parameter dataset), which returns an error:
"The column with an index of 1 is expecting a numeric value but the first row of your result set contains a value 'myText' not recognized as a valid numeric value or a valid interval."

I tried applying the column-type setting, but NUnit returns a schema-error.
      <system-under-test>
          <execution>
              <report source="Server=abc;Database=ReportServer;User Id=mine;Integrated Security=SSPI;"
                      connectionString="@myDwhDB"
                  path="/thePath/"
                  name="myReport"
                  dataset="datasetName"
        >
              </report>
          </execution>
      </system-under-test>
Do you have an idea how to handle this correctly?


Best regards,
Tilo
Coordinator
Sep 18, 2014 at 1:14 PM

Hello,

The definition of the types should be done at the assert level not at the system-under-test level. Could you paste your assert?

Sep 18, 2014 at 4:25 PM
The assert looks like the following and returns a number. Of course, the test doesn't make sense, yet. I was just about to get the sample working and compare against anything already working in another test, by now.
    <assert>
      <equalTo>
        <query connectionString="@myDwhDB">
                    SELECT COUNT (*) FROM [myDB].[mySchema].[myTable]
                </query>
      </equalTo>
    </assert>
Coordinator
Sep 30, 2014 at 6:44 PM
I really think that you should try to specify the column types at the assertion level. Logically, you're sure of the result given by your assert, so it sounds it's better to define at this level the column-types.