func (t *TestCase) ApplyContext(rulectx *Context) {
	if rulectx != nil {
		for k, v := range t.Context { // put testcase context values into rule context ...
			rulectx.Put(k, v)
		}
	}

	baseURL, err := t.Context.GetString("baseurl")
	if err == ErrNotFound {
		t.AppMsg("no base url - using only input.Endpoint")
		return
	} else if err != nil {
		t.AppMsg("error getting baseUrl from ctx using only default in input.Endpoint")
		return
	}

	// "convention" puts baseurl as prefix to endpoint in testcase"
	if !strings.HasPrefix(t.Input.Endpoint, baseURL) {
		t.Input.Endpoint = baseURL + t.Input.Endpoint
	}
}
// ApplyContext - at the end of ApplyInputs on the testcase - we have an initial http request object
// ApplyContext, applies context parameters to the http object.
// Context parameter typically involve variables that originated in discovery
// The functionality of ApplyContext will grow significantly over time.
at the end of ApplyInputs on the testcase - we have an initial http request object
ApplyContext, applies context parameters to the http object.
Context parameter typically involve variables that originated in discovery
The functionality of ApplyContext will grow significantly over time.
// ApplyContext - at the end of ApplyInputs on the testcase - we have an initial http request object // ApplyContext applies context parameters to the http object . // Context parameter typically involve variables that originated in discovery // The functionality of ApplyContext will grow significantly over time .
func (t *TestCase) ApplyContext(rulectx *Context) {
	if rulectx != nil {
		for k, v := range t.Context { 
			rulectx.Put(k, v)
		}
	}
	baseURL, err := t.Context.GetString("baseurl")
	if err == ErrNotFound {
		t.AppMsg("no base url - using only input.Endpoint")
		return
	} else if err != nil {
		t.AppMsg("error getting baseUrl from ctx using only default in input.Endpoint")
		return
	}
	if !strings.HasPrefix(t.Input.Endpoint, baseURL) {
		t.Input.Endpoint = baseURL + t.Input.Endpoint
	}
}
func ( t * TestCase ) ApplyContext ( rulectx * Context ) { if rulectx != nil { for k , v := range t . Context { rulectx . Put ( k , v ) } } baseURL , err := t . Context . GetString ( " " ) if err == ErrNotFound { t . AppMsg ( " " ) return } else if err != nil { t . AppMsg ( " " ) return } if ! strings . HasPrefix ( t . Input . Endpoint , baseURL ) { t . Input . Endpoint = baseURL + t . Input . Endpoint } }
at the end of ApplyInputs on the testcase - we have an initial http request object
ApplyContext, applies context parameters to the http object.
at the end of ApplyInputs on the testcase - we have an initial http request object ApplyContext applies context parameters to the http object .
// put testcase context values into rule context ... // "convention" puts baseurl as prefix to endpoint in testcase"