Get a query from an assembly
If you want to test a Data Access Layer there is a high probability that queries are generated by .Net code contained in an assembly. NBi is able to perform a call to a method in an assembly and interpret the result (a string or a command (sql, adomd or oledb)) as the query to test.
You need to define a system-under-test and inside the execution element, you’ll need to define from which method in which assembly you want to retrieve the query. This is done by specifying the path to your assembly, the class and the method (attributes).
If your method is expecting some parameters you can specify them in your test. To achieve this, specify an element parameter and the attribute name filled with the name of the parameter in your method. The value that you want to pass is specified in the xml element. Here we’re providing a .net parameter named calendarYear with the value CY 2004
It’s possible to pass value for parameters of type string, any numerical type, enum and DateTime. If you want to pass a DateTime the value must be provided under the format YYYY-MM-DD or YYYY-MM-DD HH:mm. For an enum, just specify the string representation of the value for the enum (expl: Blue or MatchingCase).
If your method is static, you need to inform NBi by specifying the xml attribute isStatic and set its value to true.