Search Unity

ITestResultAdaptor to contain reference to nunit ITestResult for interop publishing

Discussion in 'Testing & Automation' started by Julian_Gamble, Apr 28, 2020.

  1. Julian_Gamble

    Julian_Gamble

    Joined:
    Feb 26, 2020
    Posts:
    7
    Unity ver: 2019.3.0f6
    UTF Package Version: 1.1.13

    Hello there!

    This is a feature request for expanding the ITestResultAdaptor to include a readonly reference to the nunit native ITestResult. Currently, the TestResultAdaptor that is constructed performs a remapping operation with the passed in ITestResult, then 'discards'.

    The rationale for this stems from us having the following use case:
    "As a software engineer, I would like to extend UTF to publish my test results to ... so that I can share results with a wider audience".

    Now, this is eminently doable given the recommendation to implement ICallbacks (editor context) and ITestRunCallback for the Runtime context (of course, this class will need to be annotated with the assembly attribute TestRunCallbackAttribute).

    Given we want to share publish logic between the runtime context and editor context, it'd be ideal if we could use the same interop data container (ITestResult) across the two context. In our current use case, we have had to introduce a shim data container that performs a remap on both the runtime and editor context so that we can share this logic.

    If we had the ITestResult as a readonly member on the editor context (ICallbacks) we would be able to easily reuse the shared publish logic.

    Cheers!
    Julian
    Sr. Systems Engineer
    Kabam
     
    Last edited: Apr 28, 2020