Skip to content

Commit

Permalink
Update docs to use the just command to run the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paolino committed Feb 20, 2024
1 parent ec32f20 commit df2247b
Showing 1 changed file with 27 additions and 14 deletions.
41 changes: 27 additions & 14 deletions docs/site/src/contributor/how/testing.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,50 @@
# Testing

## Pre-requisites for a fast development cycle

Enter a valid shell with:
```
nix develop
```
before running the tests. This will bring into scope all the necessary tools and dependencies.


## Unit Tests

```
$ cabal test cardano-wallet:unit
just unit-tests-cabal
```

Alternatively, one can run tests of a particular module by running:
### matching the test title

```
$ cabal test cardano-wallet:unit --test-options "--match MyModule"
just unit-test-cabal-match "something matching the title"
```

## Integration Tests

#### Pre-requisites

Install [`cardano-node`](https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/install.html) and [`cardano-cli`](https://docs.cardano.org/projects/cardano-node/en/latest/getting-started/install.html); make sure to use one of the [compatible versions](https://github.com/cardano-foundation/cardano-wallet/blob/master/README.md#latest-releases).

Alternatively, use `cabal test all -j8`.
## babbage era
```
just babbage-integration-tests-cabal
```

#### Test
### matching the test title
```
just babbage-integration-tests-cabal-match "something matching the title"
```

## conway era
```
$ cabal test cardano-wallet:integration
just conway-integration-tests-cabal
```

Many tests require a cardano network with stake pools. To support
this, the integration tests run a local `cardano-node` cluster with
one Ouroboros BFT node and three Ouroboros Praos nodes for the three
stake pools.
### matching the test title
```
just conway-integration-tests-cabal-match "something matching the title"
```

#### Environment Variables
## Environment Variables

Several environment variables control debugging features of the
integration tests and test cluster.
Expand Down

0 comments on commit df2247b

Please sign in to comment.