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

Support temporal assertion regarding the absence of gap for a time tick #694

Open Seddryck opened 1 year ago

Seddryck commented 1 year ago

It should be possible to assert that a result-set, with a column for time ticks, is containing/preceding/succeeding a given datetime. A time tick is defined as the closed-open time interval between a datetime and a timespan.

<system-under-test>
  <result-set>
    ...
  </result-set>
</system-under-test>
<assert>
  <without-gap>
    <time-tick start="#3" span="00:15:00"/>
    <over-period start="2022-06-01" end="2022-07-01"/>
    <group-by>...<group-by>
  </without-gap>
</assert>

The optional over-period lets you define that the test should also report failure if the interval covered by the time-ticks is not containing the start and the end of the period. As we're working with closed-open intervals, it's open-end of the time-tick and the open-end of the period should match.

The optional group-by let you define that system-under-test rows should not be tested as a single set of rows but should be subdivided into subsets, each subset being defined by the group-by.