| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Convex.TestingInterface.Trace
Synopsis
- data TestRunTrace = TestRunTrace {
- trtTestId :: !Int
- trtTestName :: !Text
- trtPath :: ![Text]
- trtCategory :: !TestCategory
- trtIterations :: ![IterationTrace]
- data TestCategory
- data IterationTrace = IterationTrace {
- itIndex :: !Int
- itStatus :: !IterationStatus
- itTransitions :: ![Transition]
- itThreatModels :: ![ThreatModelTrace]
- data IterationStatus
- data Transition = Transition {
- trStepIndex :: !Int
- trAction :: !Text
- trStateBefore :: !Value
- trStateAfter :: !Value
- trTransaction :: !(Maybe TxSummary)
- trResult :: !TransitionResult
- data TransitionResult
- data TxSummary = TxSummary {
- txsId :: !(Maybe Text)
- txsInputs :: ![TxInputSummary]
- txsOutputs :: ![TxOutputSummary]
- txsMint :: !(Maybe ValueSummary)
- txsFee :: !Integer
- txsSigners :: ![Text]
- txsValidRange :: !(Maybe Text)
- data TxInputSummary = TxInputSummary {
- tisUtxo :: !Text
- tisAddress :: !Text
- tisValue :: !ValueSummary
- data TxOutputSummary = TxOutputSummary {
- tosUtxo :: !Text
- tosAddress :: !Text
- tosValue :: !ValueSummary
- tosDatum :: !(Maybe Text)
- data ValueSummary = ValueSummary {
- vsLovelace :: !Integer
- vsAssets :: ![AssetSummary]
- data AssetSummary = AssetSummary {
- asPolicyId :: !Text
- asName :: !Text
- asQuantity :: !Integer
- data ThreatModelTrace = ThreatModelTrace {
- tmtName :: !Text
- tmtTargetTxIndex :: !Int
- tmtModifications :: ![Value]
- tmtOriginalTx :: !TxSummary
- tmtModifiedTx :: !(Maybe TxSummary)
- tmtOutcome :: !ThreatModelTraceOutcome
- data ThreatModelTraceOutcome
- = TMTOPassed
- | TMTOFailed !Text
- | TMTOSkipped !Text
- | TMTOError !Text
Test run trace
data TestRunTrace Source #
Complete trace of a test run (one QuickCheck property execution = N iterations).
Links to the Tasty test tree via trtTestId.
Constructors
| TestRunTrace | |
Fields
| |
Instances
data TestCategory Source #
Whether this test run is a positive or negative test property.
Instances
| ToJSON TestCategory Source # | |
Defined in Convex.TestingInterface.Trace Methods toJSON :: TestCategory -> Value Source # toEncoding :: TestCategory -> Encoding Source # toJSONList :: [TestCategory] -> Value Source # toEncodingList :: [TestCategory] -> Encoding Source # omitField :: TestCategory -> Bool Source # | |
| Generic TestCategory Source # | |
Defined in Convex.TestingInterface.Trace Associated Types type Rep TestCategory :: Type -> Type # | |
| Show TestCategory Source # | |
Defined in Convex.TestingInterface.Trace Methods showsPrec :: Int -> TestCategory -> ShowS # show :: TestCategory -> String # showList :: [TestCategory] -> ShowS # | |
| Eq TestCategory Source # | |
Defined in Convex.TestingInterface.Trace | |
| type Rep TestCategory Source # | |
Defined in Convex.TestingInterface.Trace | |
Iteration trace
data IterationTrace Source #
Trace of a single QuickCheck iteration within a test run.
Constructors
| IterationTrace | |
Fields
| |
Instances
data IterationStatus Source #
Outcome of a single iteration.
Constructors
| IterationSuccess | |
| IterationFailure !Text | |
| IterationDiscarded !Text |
Instances
State transitions
data Transition Source #
One step in an iteration: an action was performed, the model state changed, and a transaction was (possibly) submitted.
Constructors
| Transition | |
Fields
| |
Instances
data TransitionResult Source #
Whether the transaction was successfully submitted to the mockchain.
Constructors
| TransitionSuccess !Text | TxId as text |
| TransitionFailure !Text | Error description |
Instances
Transaction summary
Compact representation of a transaction for visualization. Values are structured JSON for full fidelity.
Constructors
| TxSummary | |
Fields
| |
Instances
data TxInputSummary Source #
Summary of a transaction input.
Constructors
| TxInputSummary | |
Fields
| |
Instances
data TxOutputSummary Source #
Summary of a transaction output.
Constructors
| TxOutputSummary | |
Fields
| |
Instances
Value representation
data ValueSummary Source #
Structured representation of a Cardano value for JSON serialization.
Constructors
| ValueSummary | |
Fields
| |
Instances
data AssetSummary Source #
Constructors
| AssetSummary | |
Fields
| |
Instances
Threat model trace
data ThreatModelTrace Source #
What happened when a threat model was applied to a specific transaction in this iteration.
Constructors
| ThreatModelTrace | |
Fields
| |
Instances
data ThreatModelTraceOutcome Source #
Outcome of applying a threat model to a transaction.
Constructors
| TMTOPassed | Modified tx was correctly rejected by the ledger (good!) |
| TMTOFailed !Text | Modified tx was ACCEPTED by the ledger (vulnerability found!) |
| TMTOSkipped !Text | Couldn't test: rebalancing failed or precondition not met |
| TMTOError !Text | Unexpected error during threat model execution |