> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Module test_environment

Module: `noir_aztec::test::helpers::test_environment`

## Structs

- [CallPrivateOptions](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.CallPrivateOptions.md): Configuration for [`TestEnvironment::call_private_opts`](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.TestEnvironment.md#call_private_opts).
- [CallPublicOptions](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.CallPublicOptions.md): Configuration values for [`TestEnvironment::call_public_opts`](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.TestEnvironment.md#call_public_opts). Meant to be used by calling `new` and then chaining methods setting each value, e.g.:
  ```rust
  env.call_public_opts(caller, CallPublicOptions::new().with_max_fees_per_gas(GasFees::new(1, 1)),
  MyContract::at(addr).fn());
  ```
  Gas settings fields are not cross-validated - nonsense combinations (e.g. `teardown_gas_limits` larger than `gas_limits`) will be forwarded as-is and may be rejected by simulation.
- [CreateAccountOptions](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.CreateAccountOptions.md): Configuration values for [`TestEnvironment::create_light_account_opts`](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.TestEnvironment.md#create_light_account_opts). Meant to be used by calling `new` and then chaining methods setting each value, e.g.:
  ```rust
  env.create_light_account_opts(CreateAccountOptions::new().with_secret(42).with_partial_address(1));
  ```
  The account address is derived from both the public keys (which come from the secret) and the partial address. Setting the same secret with different partial addresses produces accounts that share master keys but have distinct addresses.
- [DeployOptions](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.DeployOptions.md): Configuration values for [`TestEnvironment::deploy_opts`](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.TestEnvironment.md#deploy_opts). Meant to be used by calling `new` and then chaining methods setting each value, e.g.:
  ```rust
  env.deploy_opts(DeployOptions::new().with_salt(42).with_secret(100), "MyContract").without_initializer();
  ```
- [ExecuteUtilityOptions](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.ExecuteUtilityOptions.md): Configuration for [`TestEnvironment::execute_utility_opts`](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.TestEnvironment.md#execute_utility_opts).
- [PrivateContextOptions](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.PrivateContextOptions.md): Configuration values for [`TestEnvironment::private_context_opts`](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.TestEnvironment.md#private_context_opts). Meant to be used by calling `new` and then chaining methods setting each value, e.g.:
  ```rust
  env.private_context_opts(PrivateContextOptions::new().at_anchor_block_number(5), ...);
  ```
- [TestEnvironment](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.TestEnvironment.md): This represents an Aztec test run, and contains all the methods utilized during one to interact with the network and manipulate its state (e.g. create accounts, make contract calls, etc.). Each test is expected to have its own instance of [`TestEnvironment`](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.TestEnvironment.md), as tests execute in parallel and so cannot share this object.
- [TestEnvironmentOptions](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.TestEnvironmentOptions.md): Configuration values for [`TestEnvironment::new_opts`](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.TestEnvironment.md#new_opts). Meant to be used by calling `new` and then chaining methods setting each value, e.g.:
  ```rust
  let env = TestEnvironment::new_opts(
      TestEnvironmentOptions::new().with_default_tag_secret_strategy(
          MessageDelivery::onchain_unconstrained(),
          TaggingSecretStrategy::non_interactive_handshake(),
      ),
  );
  ```
- [ViewPrivateOptions](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.ViewPrivateOptions.md): Configuration for [`TestEnvironment::view_private_opts`](/aztec-nr-api/v6.0.0/noir_aztec/test/helpers/test_environment/struct.TestEnvironment.md#view_private_opts).
