Seddryck / NBi

NBi is a testing framework (add-on to NUnit) for Business Intelligence and Data Access. The main goal of this framework is to let users create tests with a declarative approach based on an Xml syntax. By the means of NBi, you don't need to develop C# or Java code to specify your tests! Either, you don't need Visual Studio or Eclipse to compile your test suite. Just create an Xml file and let the framework interpret it and play your tests. The framework is designed as an add-on of NUnit but with the possibility to port it easily to other testing frameworks.
http://www.nbi.io
Apache License 2.0
106 stars 37 forks source link

Iterative result-set #623

Closed Seddryck closed 3 years ago

Seddryck commented 3 years ago

This new feature is tackling use-cases where you need to perform many times unions of result-sets defined with queries having a parameter evolving over the result-set' executions. Another example would be a directory having one files named based on the month of data that they contain (Data_2020_JAN.csv, Data_2020_FEB.csv, Data_2020_MAR.csv ...) and you must execute a union of all these files. You can surely create a long list of static unions but what will happen if the list of monthly files to concatenate is dynamically evaluated?

<result-set>
  <iteration>
    <sequence name="month"  type="dateTime">
      <loop-sentinel seed="2020-01-01" terminal="2020-03-01" step="1 month"/>
    </sequence>
  </iteration>
  <result-set>
    <file>
      <path>~Data_{@month:yyyy}_{@month:MM}.csv</path>
    </file>
  </result-set>
</result-set>
Seddryck commented 3 years ago

Implemented in 1.23.0-beta.76 or on nuget via Update-Package NBi.Framework -version 1.23.0-beta0076.

Seddryck commented 3 years ago

Documentation added in http://www.nbi.io/docs/primitive-result-set/#iterative-result-set