2020-01-14 23:25:51 +01:00
|
|
|
<?php
|
|
|
|
|
2020-03-09 17:38:00 +01:00
|
|
|
require_once('tests/CallTester.php');
|
|
|
|
// To use between two hosts, copy the folder and use CallRemoteTester class.
|
|
|
|
// SSH connection with ControlMaster is highly recommended
|
|
|
|
// $tester = new CallRemoteTester('10.0.0.2', 'tgvoip-test-suite', $argv[0], true);
|
|
|
|
$tester = new CallTester($argv[0], true);
|
2020-01-14 23:25:51 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$libraries = [
|
2020-03-09 20:17:05 +01:00
|
|
|
'stable' => 'lib/libtgvoip-stable.so', // Available currently in App Store / Play Market
|
|
|
|
'unstable-2.5' => 'lib/libtgvoip-unstable.so', // Unstable version, base version for VoIP Contest: Stage 2
|
|
|
|
'unstable-2.6' => 'lib/libtgvoip-unstable-2.6.so', // Improved unstable version, base version for VoIP Contest: Stage 3
|
|
|
|
// Add your version here
|
2020-01-14 23:25:51 +01:00
|
|
|
];
|
|
|
|
$files = 2;
|
|
|
|
for ($i = 0; $i < $files; $i++) {
|
2020-03-09 13:26:20 +01:00
|
|
|
$tester->chooseCouple(false, ($i % 2) == 0);
|
2020-01-14 23:25:51 +01:00
|
|
|
foreach ($libraries as $version => $path) {
|
|
|
|
$tester
|
|
|
|
->library($version, $path)
|
|
|
|
->start()
|
2020-03-09 13:26:20 +01:00
|
|
|
->networkType('wifi')->networkAlias('WiFi')
|
|
|
|
->end();
|
|
|
|
// continue;
|
|
|
|
$tester
|
|
|
|
->start()
|
|
|
|
->loss(9, 20)->rateControl('44kbit')->networkType('hspa')->networkAlias('3G1')
|
2020-01-14 23:25:51 +01:00
|
|
|
->end()
|
|
|
|
->start()
|
2020-03-09 13:26:20 +01:00
|
|
|
->loss(17)->rateControl('29kbit')->networkType('3g')->networkAlias('3G2')
|
2020-01-14 23:25:51 +01:00
|
|
|
->end()
|
|
|
|
->start()
|
2020-03-09 13:26:20 +01:00
|
|
|
->loss(12, 3)->rateControl('32kbit')->networkType('3g')->networkAlias('3G3')
|
2020-01-14 23:25:51 +01:00
|
|
|
->end()
|
|
|
|
->start()
|
2020-03-09 13:26:20 +01:00
|
|
|
->loss(18)->rateControl('32kbit')->networkType('3g')->networkAlias('3G4')
|
2020-01-14 23:25:51 +01:00
|
|
|
->end()
|
|
|
|
->start()
|
2020-03-09 13:26:20 +01:00
|
|
|
->loss(17, 5)->delay(500, 50)->networkType('3g')->networkAlias('3GDelay')
|
2020-01-14 23:25:51 +01:00
|
|
|
->end()
|
|
|
|
->start()
|
2020-03-09 13:26:20 +01:00
|
|
|
->loss(3, 10)->rateControl('64kbit')->after(3)->loss(20)->rateControl('8kbit')->after(3)->rateControl('64kbit')->networkType('3g')->networkAlias('3GOutage')
|
2020-01-14 23:25:51 +01:00
|
|
|
->end()
|
|
|
|
->start()
|
2020-03-09 13:26:20 +01:00
|
|
|
->loss(11)->rateControl('24kbit')->networkType('3g')->networkAlias('EDGE1')
|
2020-01-14 23:25:51 +01:00
|
|
|
->end()
|
|
|
|
->start()
|
2020-03-09 13:26:20 +01:00
|
|
|
->loss(15, 5)->rateControl('19kbit')->networkType('edge')->networkAlias('EDGE2')
|
2020-01-14 23:25:51 +01:00
|
|
|
->end()
|
|
|
|
->start()
|
2020-03-09 13:26:20 +01:00
|
|
|
->loss(20, 5)->rateControl('17kbit')->networkType('gprs')->networkAlias('GPRS1')
|
2020-01-14 23:25:51 +01:00
|
|
|
->end()
|
|
|
|
->start()
|
2020-03-09 13:26:20 +01:00
|
|
|
->loss(19, 5)->rateControl('14kbit')->networkType('gprs')->networkAlias('GPRS2')
|
2020-01-14 23:25:51 +01:00
|
|
|
->end()
|
|
|
|
->start()
|
2020-03-09 13:26:20 +01:00
|
|
|
->loss(40, 5)->delay(500, 50)->rateControl('8kbit')->networkType('gprs')->networkAlias('GPRS3')
|
2020-01-14 23:25:51 +01:00
|
|
|
->end();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|