func (h *httpGetQueryString) Execute(filePath string) error {
	router := httprouter.New()
	router.GET("/", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
		if strings.EqualFold(r.URL.Query().Get("test"), "nuclei") {
			fmt.Fprintf(w, "This is test querystring matcher text")
		}
	})
	ts := httptest.NewServer(router)
	defer ts.Close()
	results, err := testutils.RunNucleiTemplateAndGetResults(filePath, ts.URL, debug)
	if err != nil {
		return err
	}
	if len(results) != 1 {
		return errIncorrectResultsCount(results)
	}
	return nil
}
Execute executes a test case and returns an error if occurred
package main
import (
	"encoding/json"
	"errors"
	"fmt"
	"net"
	"net/http"
	"net/http/httptest"
	"strings"
	"github.com/julienschmidt/httprouter"
	"github.com/projectdiscovery/nuclei/v2/internal/testutils"
)
var httpTestcases = map[string]testutils.TestCase{
	"http/get-headers.yaml":           &httpGetHeaders{},
	"http/get-query-string.yaml":      &httpGetQueryString{},
	"http/get-redirects.yaml":         &httpGetRedirects{},
	"http/get.yaml":                   &httpGet{},
	"http/post-body.yaml":             &httpPostBody{},
	"http/post-json-body.yaml":        &httpPostJSONBody{},
	"http/post-multipart-body.yaml":   &httpPostMultipartBody{},
	"http/raw-cookie-reuse.yaml":      &httpRawCookieReuse{},
	"http/raw-dynamic-extractor.yaml": &httpRawDynamicExtractor{},
	"http/raw-get-query.yaml":         &httpRawGetQuery{},
	"http/raw-get.yaml":               &httpRawGet{},
	"http/raw-payload.yaml":           &httpRawPayload{},
	"http/raw-post-body.yaml":         &httpRawPostBody{},
	"http/raw-unsafe-request.yaml":    &httpRawUnsafeRequest{},
	"http/request-condition.yaml":     &httpRequestCondition{},
	"http/request-condition-new.yaml": &httpRequestCondition{},
	"http/self-contained.yaml":        &httpRequestSelContained{},
}
type httpGetHeaders struct{}
func (h *httpGetHeaders) Execute(filePath string) error {
	router := httprouter.New()
	router.GET("/", func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
		if strings.EqualFold(r.Header.Get("test"), "nuclei") {
			fmt.Fprintf(w, "This is test headers matcher text")
		}
	})
	ts := httptest.NewServer(router)
	defer ts.Close()
	results, err := testutils.RunNucleiTemplateAndGetResults(filePath, ts.URL, debug)
	if err != nil {
		return err
	}
	if len(results) != 1 {
		return errIncorrectResultsCount(results)
	}
	return nil
}
type httpGetQueryString struct{}