Test env documentation and new features

First part of README updated

Added panic stop of test case with retrieving logs

Added test result file of scripting support

Change-Id: I283dbf2013eaba2006391cde3c9cb2acd0a0239f
Issue-ID: NONRTRIC-154
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
diff --git a/test/common/agent_api_functions.sh b/test/common/agent_api_functions.sh
index 958f914..b2d6a24 100644
--- a/test/common/agent_api_functions.sh
+++ b/test/common/agent_api_functions.sh
@@ -280,6 +280,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -316,6 +317,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -346,6 +348,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -360,6 +363,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -414,6 +418,7 @@
 			echo " Created "$count"?("$max")"
 			echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 
@@ -474,6 +479,7 @@
 			echo " Requested(batch) "$count"?("$max")"
 			echo -e $RED" FAIL. Exepected status 200 (in request), got "$status $ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 		cid=${res:0:${#res}-3}
@@ -496,6 +502,7 @@
 			echo " Created(batch) "$count"?("$max")"
 			echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 
@@ -591,6 +598,7 @@
 
 	echo -e $RED" FAIL. One of more processes failed to execute" $ERED
 	((RES_FAIL++))
+	__check_stop_at_error
 	return 1
 }
 
@@ -626,6 +634,7 @@
 			echo " Deleted "$count"?("$max")"
 			echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 		let pid=$pid+1
@@ -672,6 +681,7 @@
 			echo " Requested(batch) "$count"?("$max")"
 			echo -e $RED" FAIL. Exepected status 200 (in request), got "$status $ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 		cid=${res:0:${#res}-3}
@@ -695,6 +705,7 @@
 			echo " Deleted(batch) "$count"?("$max")"
 			echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 
@@ -772,6 +783,7 @@
 
 	echo -e $RED" FAIL. One of more processes failed to execute" $ERED
 	((RES_FAIL++))
+	__check_stop_at_error
 	return 1
 }
 
@@ -816,6 +828,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -839,6 +852,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -868,6 +882,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -882,6 +897,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -915,6 +931,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -940,6 +957,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -988,6 +1006,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -998,6 +1017,7 @@
 	if [ $res -ne 0 ]; then
 		echo -e $RED" FAIL, returned body not correct"$ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1033,6 +1053,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1057,6 +1078,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -1088,6 +1110,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1120,6 +1143,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1128,6 +1152,7 @@
 		if [ "$body" != "$3" ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -1163,6 +1188,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1172,6 +1198,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, could not create target ric info json"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 
@@ -1181,6 +1208,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -1217,6 +1245,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1264,6 +1293,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1290,6 +1320,7 @@
 		if [ $res -ne 0 ]; then
 			echo -e $RED" FAIL, returned body not correct"$ERED
 			((RES_FAIL++))
+			__check_stop_at_error
 			return 1
 		fi
 	fi
@@ -1319,6 +1350,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1338,6 +1370,7 @@
 	if [ $res -ne 0 ]; then
 		echo -e $RED" FAIL, returned body not correct"$ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1366,6 +1399,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi
 
@@ -1394,6 +1428,7 @@
 	if [ $status -ne $1 ]; then
 		echo -e $RED" FAIL. Exepected status "$1", got "$status $ERED
 		((RES_FAIL++))
+		__check_stop_at_error
 		return 1
 	fi