scalus.testing.integration
Members list
Type members
Classlikes
Integration test context for real Cardano networks via Blockfrost.
Integration test context for real Cardano networks via Blockfrost.
Uses system time for slot calculation and Thread.sleep for time advancement. Real networks require longer wait times for transaction propagation.
Value parameters
- cardanoInfo
-
Cardano network information
- envName
-
Environment name ("Preprod" or "Mainnet")
- parties
-
Available test parties (derived from wallet mnemonic)
- provider
-
BlockfrostProvider connected to Preprod or Mainnet
Attributes
- Supertypes
Integration test context using the in-memory Emulator.
Integration test context using the in-memory Emulator.
Provides fast, deterministic testing with instant slot advancement.
Value parameters
- cardanoInfo
-
Cardano network information
- emulator
-
The in-memory Emulator instance
- initialSlot
-
Starting slot number (default: 0)
- parties
-
Available test parties
Attributes
- Supertypes
Base trait for multi-environment integration tests.
Base trait for multi-environment integration tests.
Override createTestContext() to provide a custom environment, or use the built-in factory methods.
Environment is selected via SCALUS_TEST_ENV:
- "emulator" (default) - Fast in-memory testing
- "yaci" - YaciDevKit Docker container
- "preprod" - Blockfrost Preprod testnet
- "mainnet" - Blockfrost Mainnet
- Custom values can be handled by overriding createTestContext()
Example usage:
class MyIntegrationTest extends AnyFunSuite with IntegrationTest {
test("my test") {
val ctx = createTestContext()
val utxos = ctx.provider.findUtxos(ctx.alice.address).await().toOption.get
// ...
}
}
Attributes
- Supertypes
-
trait ScalusTesttrait Assertionstrait TripleEqualstrait TripleEqualsSupporttrait ArbitraryInstancestrait ArbitraryInstancestrait ArbitraryInstancestrait ArbitraryInstancestrait BeforeAndAfterAlltrait SuiteMixinclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait YaciDevKit
- Self type
-
Suite
Unified test context for integration testing across different environments.
Unified test context for integration testing across different environments.
All time-dependent methods return Future for async compatibility. Use .await() extension from scalus.utils.await for synchronous test code.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
A test party with all information needed for transaction signing and submission.
A test party with all information needed for transaction signing and submission.
Value parameters
- addrKeyHash
-
Payment key hash for script requirements
- address
-
Shelley address for receiving funds
- party
-
The Party enum value
- signer
-
Transaction signer for signing transactions
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Integration test context for YaciDevKit.
Integration test context for YaciDevKit.
Uses system time for slot calculation and Thread.sleep for time advancement. YaciDevKit uses 1-second slots starting from zero time.
Access test parties via alice, bob, eve. For full HD account access (stake, drep, change keys), use Party.Alice.account directly.
Value parameters
- cardanoInfo
-
Cardano network information
- parties
-
Available test parties
- provider
-
BlockfrostProvider connected to YaciDevKit
Attributes
- Supertypes