+# Tests if a variable value in the RIC simulator contains the target string and and optional timeout
+# Arg: <ric-id> <variable-name> <target-value> - This test set pass or fail depending on if the variable contains
+# the target or not.
+# Arg: <ric-id> <variable-name> <target-value> <timeout-in-sec> - This test waits up to the timeout seconds
+# before setting pass or fail depending on if the variable value contains the target
+# value or not.
+# (Function for test scripts)
+sim_contains_str() {
+
+ if [ $# -eq 3 ] || [ $# -eq 4 ]; then
+ app=$1
+ port=$(__find_sim_port $app)
+ __var_test $app "$RIC_SIM_LOCALHOST$port/counter/" $2 "contain_str" $3 $4
+ return 0
+ else
+ ((RES_CONF_FAIL++))
+ __print_err "needs three or four args: <ric-id> <sim-param> <target-value> [ timeout ]"
+ return 1
+ fi
+}
+