• Home
  • .NET
  • Unity
  • Godot
  • Design Overview
  • API Documentation
  • Changelog
  • GitHub
Show / Hide Table of Contents
  • Responsible
    • BddExtensions
    • IExternalResultSource
    • IFailureListener
    • IGlobalContextProvider
    • IOptionalTestResponder
    • ITestInstruction<T>
    • ITestOperation<T>
    • ITestResponder<T>
    • ITestScheduler
    • ITestWaitCondition<T>
    • LinqSupport
    • OptionalTestResponder
    • RepetitionLimitExceededException
    • Responsibly
    • TestFailureException
    • TestInstruction
    • TestInstructionExecutor
    • TestInstructionExecutor.StateNotificationCallback
    • TestOperationState
    • TestResponder
    • TestWaitCondition
  • Responsible.Bdd
    • IBddStep
    • Keywords
    • ScenarioBuilder
  • Responsible.Context
    • RunContext
  • Responsible.Docs
    • Inherit
  • Responsible.State
    • ITestOperationState
    • ITestOperationState<T>
    • StateStringBuilder
    • TestOperationStateTransition
    • TestOperationStatus
  • Responsible.Unity
    • TestOperationYieldInstruction<T>
    • UnhandledLogMessageException
    • UnityErrorLogInterceptor
    • UnityFailureListener
    • UnityTestInstructionExecutor
    • UnityTestScheduler
  • Responsible.Utilities
    • IMultipleTaskAwaiter<T>
    • IMultipleTaskSource<T>
    • IndentedStringBuilder<T>
    • RetryingPoller

Namespace Responsible.Unity

Contains classes which are Unity specific, and only available on Unity builds. The main classes to use are UnityTestInstructionExecutor, which sets up a default test instruction executor for Unity, and TestOperationYieldInstruction<T>, which can be yielded from [UnityTest] methods.

Classes

TestOperationYieldInstruction<T>

A UnityEngine.CustomYieldInstruction that can be yielded from a [UnityTest] playmode test.

UnhandledLogMessageException

Exception type which is used when an unhandled log message is detected during test operation execution.

UnityErrorLogInterceptor

Class used to replicate the Unity test runner behaviour of failing tests when either LogError(object) or LogException(Exception) is called.

UnityFailureListener

Provides default IFailureListener functionality for Unity, by logging failures. Unity doesn't handle exceptions in coroutines very well in tests (one of the motivations to write Responsible), so we also log failures to ensure they are visible.

UnityTestInstructionExecutor

A TestInstructionExecutor implementation that should work well in Unity:

  • Polls on every frame
  • Causes test operations to fail on logged errors
  • Can also log failures, as Unity will swallow exceptions in nested coroutines

UnityTestScheduler

Default ITestScheduler implementation for Unity. Will call polling methods in Update.

In this article
Back to top Generated by DocFX