Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python autotests for sample apps #663

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

maxsharabayko
Copy link
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 added this to Needs review in Development via automation Apr 25, 2019
@maxsharabayko maxsharabayko moved this from Needs review to In progress in Development Apr 25, 2019
@maxsharabayko maxsharabayko self-assigned this Apr 25, 2019
@zerodefect
Copy link
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 moved this from In progress to To do in Development Aug 7, 2019
@maxsharabayko maxsharabayko removed this from the v1.3.4 milestone Aug 19, 2019
@maxsharabayko maxsharabayko added this to the v1.4.1 milestone Aug 19, 2019
@maxsharabayko maxsharabayko modified the milestones: v1.4.1, v1.4.2 Nov 3, 2019
@maxsharabayko maxsharabayko removed this from To do in Development Dec 18, 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.

None yet

3 participants