Using Tunnels in Automated Tests

Last modified on March 23, 2023

To use the SmartBear SecureTunnel function in automated tests, you need to configure your test framework to start the tunnel automatically. The easiest way to do this is to run the SBSecureTunnel command-line utility.

  • Configure your test framework to start the utility automatically. If your test run is scheduled, then you can also schedule the tunnel to start before it.

    – or –

    You can run the utility manually beforehand. For instance, if your tests are scheduled to run at night, you can run the utility manually before you go home.

  • We’d suggest adding the --ready file-name parameter to the command line, for example:

    SBSecureTunnel.exe --username your-account --authkey api-key --acceptAllCerts --ready c:/Temp/tunnel-ready.tmp

    This way, the utility will create this file after the tunnel is up and running. The presence of this file indicates that your automated tests can start successfully.

  • If you need the tunnel to shut down automatically, add the --kill file-name parameter to the command line:

    SBSecureTunnel.exe --username your-account --authkey api-key --acceptAllCerts --ready c:/Temp/tunnel-ready.tmp --kill C:/Temp/test-is-over.tmp

    It tells the tunnel utility to monitor for the specified file on the hard drive.

    Your automated tests can create this file at the end of a test session, and it will be a signal for the tunnel to shut down.

See Also

Local Testing - BitBar SecureTunnel
SecureTunnel Command Line

Highlight search results