Skip to content

Commit

Permalink
Run functional tests by groupname (Dash-Industry-Forum#3998)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy authored Jul 22, 2022
1 parent 75f59f2 commit b89fe4f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ commands:
protocol:
default: "https"
type: string
streams:
default: "all"
groupname:
default: ""
type: string
steps:
- run:
name: Run functional tests (<<parameters.browser>> / <<parameters.protocol>>) <<parameters.streams>>
name: Run functional tests (<<parameters.browser>> / <<parameters.protocol>>) <<parameters.groupname>>
command:
node test/functional/runTests.js --selenium=remote --reporters=junit --app=remote --browsers=<<parameters.browser>> --protocol=<<parameters.protocol>> --streams="<<parameters.streams>>"
node test/functional/runTests.js --selenium=remote --reporters=junit --app=remote --browsers=<<parameters.browser>> --protocol=<<parameters.protocol>> --groupname="<<parameters.groupname>>"
jobs:
build-and-unit-test:
executor: dashjs-executor
Expand Down Expand Up @@ -142,11 +142,11 @@ jobs:
steps:
- functional_steps
- run_test_suite:
streams: VOD (Static MPD)
groupname: VOD (Static MPD)
- run_test_suite:
streams: LIVE (Dynamic MPD)
groupname: LIVE (Dynamic MPD)
- run_test_suite:
streams: Live Low Latency
groupname: Live Low Latency
- store_test_results:
path: test/functional/reports

Expand All @@ -155,9 +155,9 @@ jobs:
steps:
- functional_steps
- run_test_suite:
streams: DRM (modern)
groupname: DRM (modern)
- run_test_suite:
streams: DRM Content (conservative/legacy)
groupname: DRM Content (conservative/legacy)
- store_test_results:
path: test/functional/reports

Expand All @@ -166,13 +166,13 @@ jobs:
steps:
- functional_steps
- run_test_suite:
streams: Subtitles and Captions
groupname: Subtitles and Captions
- run_test_suite:
streams: Thumbnails
groupname: Thumbnails
- run_test_suite:
streams: Audio-only
groupname: Audio-only
- run_test_suite:
streams: Smooth Streaming
groupname: Smooth Streaming

- store_test_results:
path: test/functional/reports
Expand Down
8 changes: 8 additions & 0 deletions test/functional/runTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ var args = yargs
describe: 'Output log/debug messages',
type: 'boolean',
default: 'false'
},
'groupname': {
describe: 'Group name that the stream needs to belong to. Only applied if a groupname is present such as in the list of reference vectors.',
default: ''
}
})
.parse();
Expand Down Expand Up @@ -199,6 +203,10 @@ if (args.mpd !== '') {
config.mpd = args.mpd;
}

if (args.groupname !== '') {
config.groupname = args.groupname;
}

config.source = args.source;

// Debug logs
Expand Down
8 changes: 8 additions & 0 deletions test/functional/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports.getStreams = function () {
if(stream.url.substr(0,2) === '//') {
stream.url = intern.config.protocol + ':' + stream.url;
}
stream.groupName = groupName;
streams.push(stream);
}
}
Expand All @@ -30,6 +31,13 @@ module.exports.getStreams = function () {
});
}

// Filter streams if groupname is set
if (intern.config.groupname) {
streams = streams.filter(stream => {
return intern.config.groupname == stream.groupName;
});
}

// If input manifest url is provided then use it
if (intern.config.mpd) {
streams = [{
Expand Down

0 comments on commit b89fe4f

Please sign in to comment.