Skip to content

Commit

Permalink
Added network capture docs for live testing (#2895)
Browse files Browse the repository at this point in the history
* Added network capture docs for live testing

* Removed garbage

* Polish after review

* Formatting

---------

Co-authored-by: Diego Molina <[email protected]>
  • Loading branch information
diegoperini and diemol authored Aug 21, 2024
1 parent 5d7c4d5 commit 91fa817
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions docs/mobile-apps/features/network-capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,31 @@ To enable network traffic capturing in your tests:
- [Espresso via saucectl](/mobile-apps/automated-testing/espresso-xcuitest/espresso/#networkcapture)
- [XCUITest via saucectl](/mobile-apps/automated-testing/espresso-xcuitest/xcuitest/#networkcapture)

Now you can start your live or automated testing session. Your network logs will be captured and displayed in the test results page.
Now you can start your live or automated testing session. Your network logs will be captured and displayed in the test results page as well as During a Live Testing session with the Developer Options window.

## Accessing HAR Files
## Accessing Network Traffic in Realtime (Live Testing)

To be able to observe network traffic in realtime:

1. Navigate to **Live** -> **Mobile App**/**Cross Browser**
2. Choose device and start a session
3. Launch the network inspector

<img src={useBaseUrl('img/mobile-apps/network-capture-1.png')} alt="Select Developer Options" width="300"/>

* Start the capture.

<img src={useBaseUrl('img/mobile-apps/network-capture-2.png')} alt="Start capture" width="650"/>

* Inspect network logs as they arrive

<img src={useBaseUrl('img/mobile-apps/network-capture-3.png')} alt="Inspect network logs" width="650"/>

* A copy of what you see in the inspector can be downloaded in HAR format with the following button.

<img src={useBaseUrl('img/mobile-apps/network-capture-4.png')} alt="Inspect network logs" width="650"/>

## Accessing HAR Files (Live and Automated Testing)

To download HAR files from Sauce Labs:

Expand Down Expand Up @@ -77,9 +99,9 @@ Alternatively, some other commonly used HAR viewers include:

- Android Emulators
- iOS Simulators
- Hybrid Applications (React Native, Cordova, Flutter)
- Android Chrome Browser
- iOS Safari Browser
- Hybrid Applications in automated tests (React Native, Cordova, Flutter)
- Android Chrome Browser in automated tests
- iOS Safari Browser in automated tests

:::

Expand Down
Binary file added static/img/mobile-apps/network-capture-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mobile-apps/network-capture-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mobile-apps/network-capture-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/mobile-apps/network-capture-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 91fa817

Please sign in to comment.