Please develop automated unit testing in NT8. Where tests could operate under:
- Calculation.OnBarClose, and Calculation.OnEachTick, and
- State.Realtime and State.Historical.
In the words of reach4thelasers "Unit tests are crucial for an application of this nature: it is financial in nature and contains a ton of math" (Making NinjaScript Development Unit Testable).
For the benefit of forum members (MSDN - Unit test basics) or (Mark's Devblog - The fundamentals of unit testing) :
- The Arrange section of a unit test method initializes objects and sets the value of the data that is passed to the method under test.
- The Act section invokes the method under test with the arranged parameters.
- The Assert section verifies that the action of the method under test behaves as expected.
- mock price ticks, where mock ticks behave the same as real tick events (i.e. they cumulate into bars with properties like FirstTickOfBar and FirstBarOfSession),
- record (or create) a mock tick series (e.g. ^SP500 1 October - 31 October 2017),
- insert (or reference) a mock tick series in the Arrange section of a unit test, and
- raise events (i.e. tick events) based on the mock tick series.
What ever the implementation, please develop automated unit testing in NT8.
Thanks
Shannon
Comment