From ccfd8703af551a8a6e24a271bd7f2b9f4f9fe452 Mon Sep 17 00:00:00 2001
From: MJB <mjb@it-innovation.soton.ac.uk>
Date: Mon, 12 Feb 2018 23:12:17 +0000
Subject: [PATCH] Started to document the manual testcase for streaming before
 automation

---
 test/streaming/manual.md | 61 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 57 insertions(+), 4 deletions(-)

diff --git a/test/streaming/manual.md b/test/streaming/manual.md
index c585ff4..b2e6654 100644
--- a/test/streaming/manual.md
+++ b/test/streaming/manual.md
@@ -21,16 +21,69 @@
 //      Created for Project :   FLAME
 -->
 
-# CLMC Streaming Test
+# CLMC Adaptive Streaming Test
 
-Install VLC video client, used a nightly build
+This test streamings mpeg-dash video using the apache server monitored by Telegraf configured with a default apache plugin. The data is stored in the `clmc-service` using database `CLMCMetrics` and measurement `apache`
 
-https://nightlies.videolan.org/build/win32/vlc-3.0.0-rc1-20171201-0326/vlc-3.0.0-20171201-0326-rc1-win32.exe
+The following command brings up the services
 
 `vagrant --infra=streaming up`
 
+* clmc-service: configured with influx, kapacitor, chornograf
+* apache1: configured with apache and a test video located at http://192.168.50.11:80/test-video/stream.mpd on the internal vbox network adn at http://localhost:8890/test-video/stream.mpd if accessing from the host machine
+
+## Manual test on Windows
+
+### View the video
+Install VLC video client on the host machine, you must use a very recent version otherwise the MPD file cannot we read. At the time of writng the following nighly build was installed:
+
+https://nightlies.videolan.org/build/win32/vlc-3.0.0-rc1-20171201-0326/vlc-3.0.0-20171201-0326-rc1-win32.exe
+
 Start the VLC Player
 
 `Media->Open Network Stream`
 
-`Enter the network URL: http://localhost:8890/flame-video/stream.mpd`
+The test video is the FLAME project video and it can be viewed at the following location.
+
+`Enter the network URL: http://localhost:8890/test-video/stream.mpd`
+
+The video should play.
+
+### Query the data
+
+Open Chronograph by entering the following URL into a browser on the host http://localhost:8888
+
+Connect with
+
+* Connection String: http://localhost:8086
+* Name: Influx 1
+* Telegraf database: CLMCMetrics
+
+Press the Data Explorer in the menu
+
+Select the apache measurement and create a query such as 
+
+`SELECT mean("BytesPerSec") AS "mean_BytesPerSec" FROM "CLMCMetrics"."autogen"."apache" WHERE time > now() - 5m GROUP BY time(10s)`
+
+## Set a KPI trigger
+
+Press Alerting in the menu
+
+Connect to Kapacitor on http://locahost:9092
+
+Create a rule CLMCMetrics.apache.cpu_load > 0.02
+
+There's all sorts of notification possibilities
+ 
+## Automatic test using JMeter and VLC command line
+
+To be completed.
+
+* Create a VM called `vlc-client` with vlc and jmeter installed
+* Write a testcase using the JMeter GUI that streams the test video to a set of clients.
+  * The options for scaling the number of client threads needs to be explored
+  * The test conditions needs to be defined i.e. triggers at specific thresholds when cpu usage reaches a certain point
+
+Issues, the Vagrantfile needs updating as the `vlc-client` needs to run two provisioning scripts adn the assumption is there's one provisioning script and the telegraf provisioning script. Looks like a hack is coming....if `vlc-client` then provision jmeter.
+
+We then need programtically create rules using the kapacitor CLI to set the KPIs and get the alerts rather than all the manual set up 
\ No newline at end of file
-- 
GitLab