Skip to content

Python autotests for sample apps#663

Draft
maxsharabayko wants to merge 17 commits into
Haivision:masterfrom
maxsharabayko:tests/apps-autotest
Draft

Python autotests for sample apps#663
maxsharabayko wants to merge 17 commits into
Haivision:masterfrom
maxsharabayko:tests/apps-autotest

Conversation

@maxsharabayko
Copy link
Copy Markdown
Collaborator

@maxsharabayko maxsharabayko commented Apr 25, 2019

Create autotests for srt-live-transmit and srt-file-transmit.
See /scripts/python/test-apps.py integrated into .travis.yml.

  1. Generate payload and feed to the sending instance of srt-live-transmit via stdin (file://con).
  2. Connect two instances on a localhost via srt protocol.
  3. Read out data from stdout (file://con) of the receiving srt-live-transmit.
  4. Validate data received.

The pipeline:

file://con {srt-live-transmit} -> srt(localhost) -> {srt-live-transmit} -> file://con

TODO:
Travis

  • Run the script for the OSX build. At the moment python 3 is not installed there. Add the dependency.
  • Try to have python 3.6+ for cool string formatting features of python. Currently v3.4 on Linux configuration.
  • Make the test discoverable by Travis. Currently the test is just run in the flow of a CI script. Still the result is detected.

test-apps.py

  • Start the sending function in a separate thread to add a timeout for the test.
    time.sleep(0.01) * maxLoops

srt-live-transmit

  • srt://:4200 -> srt://127.0.0.1:4200
  • srt://127.0.0.1:4200 -> srt://:4200
  • Catch connection messages on stderr. Currently does not read. Flush does not help.

srt-file-transmit

  • Allow file://con target. At the moment the app will complain about the mismatching stream IDs of the sender and the receiver.
  • srt://:4200 -> srt://127.0.0.1:4200
  • srt://127.0.0.1:4200 -> srt://:4200

@maxsharabayko maxsharabayko added the [tests] Area: Unit tests label Apr 25, 2019
@maxsharabayko maxsharabayko added this to the v.1.3.3 milestone Apr 25, 2019
@maxsharabayko maxsharabayko self-assigned this Apr 25, 2019
@zerodefect
Copy link
Copy Markdown
Contributor

Thinking about this a bit more, is it worth generating a one-way hash (MD5?) of the 'sent' and then comparing it to the 'received' for additional validation? I think comparing file size too for added measure.

@maxsharabayko maxsharabayko modified the milestones: v.1.3.3, v.1.3.4 May 29, 2019
@maxsharabayko maxsharabayko modified the milestones: v1.3.4, v1.4.1 Aug 19, 2019
@maxsharabayko maxsharabayko modified the milestones: v1.4.1, v1.4.2 Nov 3, 2019
@maxsharabayko maxsharabayko modified the milestones: v1.5.0, v1.5.1 May 26, 2020
@mbakholdina mbakholdina modified the milestones: v1.5.1, Backlog May 26, 2021
@maxsharabayko maxsharabayko added the Type: Enhancement Indicates new feature requests label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[tests] Area: Unit tests Type: Enhancement Indicates new feature requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants