anchor.diff:  -include_lib("ctool/include/logging.hrl").
   -include_lib("common_test/include/ct.hrl").
   
  --export([%around_advice/4,
  -  is_standard_test/0, is_stress_test/0, stress_test/1, should_clear/1,
  -  inject_parameters/2, get_config_params/1, run_testcase/5, set_up_stress_test/3,
  -  run_stress_test/4, run_test/5, all/2, stress_all/3]).
  +-export([is_standard_test/0, is_stress_test/0, stress_test/1, should_clear/1,
  +  all/2, stress_all/3, run_stress_test/4, run_test/5]).
   
   -type proplist() :: [{Key :: atom(), Value :: term()}].
   
  
positive.code:       run_testcase(SuiteName, CaseName, CaseArgs, Data, TestFun)
    end.
  
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% TODO add doc
  %% @end
  %%--------------------------------------------------------------------
  %% TODO update spec
  -spec run_testcase(SuiteName :: list(), CaseName :: list(), CaseArgs :: list(),
      Data :: list(), TestFun :: function()) -> term().
  run_testcase(SuiteName, CaseName, CaseArgs, Data, TestFun) ->
    DefaultReps = proplists:get_value(repeats, Data, 1),
    DefaultSuccessRate = proplists:get_value(success_rate, Data, 100),
    DefaultParams = parse_parameters(proplists:get_value(parameters, Data, [])),
    case is_standard_test() of
      false ->
        CaseDescr = proplists:get_value(description, Data, ""),
        Configs = proplists:get_all_values(config, Data),
        exec_perf_configs(TestFun, CaseDescr, SuiteName, CaseName, CaseArgs,
          Configs, DefaultReps, DefaultSuccessRate, DefaultParams);
      _ ->
        exec_ct_config(TestFun, CaseArgs, DefaultParams)
    end.
  
  %%--------------------------------------------------------------------
  %% @doc
  %%TODO add doc
  %% @end
  %%--------------------------------------------------------------------
  %%TODO add spec
  set_up_stress_test(SuiteName, CasesNames, NoClearingCases) ->
    case {os:getenv(?STRESS_ENV_VARIABLE), os:getenv(?STRESS_NO_CLEARING_ENV_VARIABLE)} of
      {"true", _} ->
        save_suite_and_cases(SuiteName, CasesNames),
        [stress_test];
      {_, "true"} ->
        save_suite_and_cases(SuiteName, NoClearingCases),
        [stress_test]
    end.
  
  %%--------------------------------------------------------------------
  %% @doc
  %%TODO add doc
  %% @end
  %%--------------------------------------------------------------------
  %%TODO add spec
  run_stress_test(SuiteName, CaseArgs, Data, TestFun) ->
  
    CaseDescr = proplists:get_value(description, Data, ""),
  
negative.code:   end.
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% This function runs given ct or performance test case in given suite.
  %% @end
  %%--------------------------------------------------------------------
  -spec run_testcase(SuiteName :: list(), CaseName :: list(), CaseArgs :: list(),
      Data :: list(), TestFun :: function()) -> term().
  run_testcase(SuiteName, CaseName, CaseArgs, Data, TestFun) ->
    DefaultReps = proplists:get_value(repeats, Data, 1),
    DefaultSuccessRate = proplists:get_value(success_rate, Data, 100),
    DefaultParams = parse_parameters(proplists:get_value(parameters, Data, [])),
    case is_standard_test() of
      false ->
        CaseDescr = proplists:get_value(description, Data, ""),
        Configs = proplists:get_all_values(config, Data),
        exec_perf_configs(TestFun, CaseDescr, SuiteName, CaseName, CaseArgs,
          Configs, DefaultReps, DefaultSuccessRate, DefaultParams);
      _ ->
        exec_ct_config(TestFun, CaseArgs, DefaultParams)
    end.
  
  %%--------------------------------------------------------------------
  %% @doc
  %% This function saves suite and cases names for sress test.
  %% @end
  %%--------------------------------------------------------------------
  -spec set_up_stress_test(SuiteName :: atom(), CasesNames ::  [atom()],
      NoClearing ::  [atom()]) -> any().
  set_up_stress_test(SuiteName, CasesNames, NoClearingCases) ->
    case {os:getenv(?STRESS_ENV_VARIABLE), os:getenv(?STRESS_NO_CLEARING_ENV_VARIABLE)} of
      {"true", _} ->
        save_suite_and_cases(SuiteName, CasesNames),
        [stress_test];
      {_, "true"} ->
        save_suite_and_cases(SuiteName, NoClearingCases),
        [stress_test]
    end.
  
  %%--------------------------------------------------------------------
  %% @private
  