zcash-android-wallet-sdk/docs/testing/Darkside.md

1.6 KiB

Running Darksidewalletd tests

Some tests are executed against a fake version of the Zcash network, by running a localhost lightwalletd server in a special mode called "darkside". This is different from the Zcash test network, which is a publicly accessible and deployed network that acts more like a staging network before changes are pushed to the production network.

The module darkside-test-lib contains a test suite that requires manually launching a localhost lightwalletd instance in darkside mode.

To run these tests

  1. clone lightwalletd git clone https://github.com/zcash/lightwalletd.git

  2. Install Go.

    1. If you're using homebrew
      brew install go
      
  3. Inside the lightwalletd checkout, compile lightwalletd

    make
    
  4. Inside the lightwalletd checkout, run the program in darkside mode

    ./lightwalletd --log-file /dev/stdout --darkside-very-insecure  --darkside-timeout 1000 --gen-cert-very-insecure --data-dir . --no-tls-very-insecure
    
  5. Launch an Android emulator. Darkside tests are configured to only run on an Android emulator, as this makes it easy to automate finding the localhost server running on the same computer that's also running the emulator.

  6. Run the Android test suite

    1. From the command line
      ./gradlew :darkside-test-lib:connectedAndroidTest
      
    2. From Android Studio
      1. Choose the run configuration :darkside-test-lib:connectedAndroidTest