repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/boomer/ratelimiter_test.go
parsing/hrp/pkg/boomer/ratelimiter_test.go
package boomer import ( "testing" "time" ) func TestStableRateLimiter(t *testing.T) { rateLimiter := NewStableRateLimiter(1, 10*time.Millisecond) rateLimiter.Start() defer rateLimiter.Stop() blocked := rateLimiter.Acquire() if blocked { t.Error("Unexpected blocked by rate limiter") } blocked = rateLimiter...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/boomer/grpc/messager/messager.pb.go
parsing/hrp/pkg/boomer/grpc/messager/messager.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 // protoc v3.19.4 // source: grpc/proto/messager.proto package messager import ( reflect "reflect" sync "sync" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runti...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/boomer/grpc/messager/messager_grpc.pb.go
parsing/hrp/pkg/boomer/grpc/messager/messager_grpc.pb.go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v3.19.4 // source: grpc/proto/messager.proto package messager import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/stat...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/boomer/data/data.go
parsing/hrp/pkg/boomer/data/data.go
/* * Copyright 2020 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_curl_test.go
parsing/hrp/pkg/convert/from_curl_test.go
package convert import ( "testing" "github.com/stretchr/testify/assert" ) var curlPath = "../../../examples/data/curl/curl_examples.txt" func TestLoadCurlCase(t *testing.T) { tCase, err := LoadCurlCase(curlPath) if !assert.NoError(t, err) { t.Fatal(err) } if !assert.Equal(t, 6, len(tCase.TestSteps)) { t.F...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_jmeter.go
parsing/hrp/pkg/convert/from_jmeter.go
package convert
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_curl.go
parsing/hrp/pkg/convert/from_curl.go
package convert import ( "bufio" "fmt" "net/http" "net/url" "os" "strings" "github.com/google/shlex" "github.com/pkg/errors" "github.com/rs/zerolog/log" "github.com/test-instructor/yangfan/parsing/hrp" "github.com/test-instructor/yangfan/parsing/hrp/internal/json" ) const ( originCmdKey = "_origin_cmd_k...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_json.go
parsing/hrp/pkg/convert/from_json.go
package convert import ( "github.com/pkg/errors" "github.com/rs/zerolog/log" "github.com/test-instructor/yangfan/parsing/hrp" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" ) func LoadJSONCase(path string) (*hrp.TCase, error) { log.Info().Str("path", path).Msg("load json case file") caseJSON...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_gotest.go
parsing/hrp/pkg/convert/from_gotest.go
package convert import ( _ "embed" "os" "github.com/rs/zerolog/log" "github.com/test-instructor/yangfan/parsing/hrp" "github.com/test-instructor/yangfan/parsing/hrp/internal/myexec" ) func convert2GoTestScripts(paths ...string) error { log.Warn().Msg("convert to gotest scripts is not supported yet") os.Exit(...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/to_gotest.go
parsing/hrp/pkg/convert/to_gotest.go
package convert // TODO: convert TCase to gotest case func (c *TCaseConverter) toGoTest() (string, error) { return "", nil }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_swagger.go
parsing/hrp/pkg/convert/from_swagger.go
package convert import ( "github.com/go-openapi/spec" "github.com/pkg/errors" "github.com/test-instructor/yangfan/parsing/hrp" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" ) func LoadSwaggerCase(path string) (*hrp.TCase, error) { // load swagger file caseSwagger := new(spec.Swagger) err :...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/to_json.go
parsing/hrp/pkg/convert/to_json.go
package convert import "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" // convert TCase to JSON case func (c *TCaseConverter) toJSON() (string, error) { jsonPath := c.genOutputPath(suffixJSON) err := builtin.Dump2JSON(c.tCase, jsonPath) if err != nil { return "", err } return jsonPath, nil }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_pytest.go
parsing/hrp/pkg/convert/from_pytest.go
package convert
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/main_test.go
parsing/hrp/pkg/convert/main_test.go
package convert import ( "testing" "github.com/stretchr/testify/assert" "github.com/test-instructor/yangfan/parsing/hrp" ) const ( profilePath = "../../../examples/data/profile.yml" profileOverridePath = "../../../examples/data/profile_override.yml" ) var converter *TCaseConverter func init() { conv...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_har_test.go
parsing/hrp/pkg/convert/from_har_test.go
package convert import ( "testing" "github.com/stretchr/testify/assert" "github.com/test-instructor/yangfan/parsing/hrp" ) var harPath = "../../../examples/data/har/demo.har" var caseHar *CaseHar func init() { caseHar, _ = loadCaseHAR(harPath) } func TestLoadHAR(t *testing.T) { caseHAR, err := loadCaseHAR(h...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/to_yaml.go
parsing/hrp/pkg/convert/to_yaml.go
package convert import "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" // convert TCase to YAML case func (c *TCaseConverter) toYAML() (string, error) { yamlPath := c.genOutputPath(suffixYAML) err := builtin.Dump2YAML(c.tCase, yamlPath) if err != nil { return "", err } return yamlPath, nil }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_yaml.go
parsing/hrp/pkg/convert/from_yaml.go
package convert import ( "reflect" "github.com/pkg/errors" "github.com/test-instructor/yangfan/parsing/hrp" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" ) func LoadYAMLCase(path string) (*hrp.TCase, error) { // load yaml case file caseJSON := new(hrp.TCase) err := builtin.LoadFile(path, ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_har.go
parsing/hrp/pkg/convert/from_har.go
package convert import ( "encoding/base64" "fmt" "net/url" "reflect" "sort" "strings" "time" "github.com/pkg/errors" "github.com/rs/zerolog/log" "github.com/test-instructor/yangfan/parsing/hrp" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" "github.com/test-instructor/yangfan/parsing/h...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_postman_test.go
parsing/hrp/pkg/convert/from_postman_test.go
package convert import ( "testing" "github.com/stretchr/testify/assert" ) var collectionPath = "../../../examples/data/postman/postman_collection.json" func TestLoadCollection(t *testing.T) { casePostman, err := loadCasePostman(collectionPath) if !assert.NoError(t, err) { t.Fatal(err) } if !assert.Equal(t, ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_ab.go
parsing/hrp/pkg/convert/from_ab.go
package convert
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/from_postman.go
parsing/hrp/pkg/convert/from_postman.go
package convert import ( "fmt" "net/url" "reflect" "strings" "github.com/pkg/errors" "github.com/rs/zerolog/log" "github.com/test-instructor/yangfan/parsing/hrp" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" "github.com/test-instructor/yangfan/parsing/hrp/internal/json" ) // ===========...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/to_pytest.go
parsing/hrp/pkg/convert/to_pytest.go
package convert import ( "github.com/pkg/errors" "github.com/test-instructor/yangfan/parsing/hrp/internal/myexec" ) // convert TCase to pytest case func (c *TCaseConverter) toPyTest() (string, error) { jsonPath, err := c.toJSON() if err != nil { return "", errors.Wrap(err, "convert to JSON case failed") } a...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/pkg/convert/main.go
parsing/hrp/pkg/convert/main.go
package convert import ( _ "embed" "fmt" "path/filepath" "github.com/rs/zerolog/log" "github.com/test-instructor/yangfan/parsing/hrp" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" "github.com/test-instructor/yangfan/parsing/hrp/internal/sdk" ) // target testcase format extensions const ( ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/pytest.go
parsing/hrp/cmd/pytest.go
package cmd import ( "fmt" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/internal/myexec" "github.com/test-instructor/yangfan/parsing/hrp/internal/pytest" "github.com/test-instructor/yangfan/parsing/hrp/internal/version" ) var pytestCmd = &cobra.Command{ ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/root.go
parsing/hrp/cmd/root.go
package cmd import ( "os" "runtime" "strings" "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/cmd/adb" "github.com/test-instructor/yangfan/parsing/hrp/cmd/ios" "github.com/test-instructor/yangfan/parsing/hrp/internal/code" "github...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/convert.go
parsing/hrp/cmd/convert.go
package cmd import ( "fmt" "io/ioutil" "path/filepath" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" "github.com/test-instructor/yangfan/parsing/hrp/internal/myexec" "github.com/test-instructor/yangfan/parsing/hrp/internal/version" "gi...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/build.go
parsing/hrp/cmd/build.go
package cmd import ( "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp" ) var buildCmd = &cobra.Command{ Use: "build $path ...", Short: "build plugin for testing", Long: `build python/go plugin for testing`, Example: ` $ hrp build plugin/debugtalk.go $ hrp build plugin/debugtalk.py...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/scaffold.go
parsing/hrp/cmd/scaffold.go
package cmd import ( "errors" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/internal/scaffold" ) var scaffoldCmd = &cobra.Command{ Use: "startproject $project_name", Aliases: []string{"scaffold"}, Short: "create a scaffold project", Args: cobra...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/wiki.go
parsing/hrp/cmd/wiki.go
package cmd import ( "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/internal/wiki" ) var wikiCmd = &cobra.Command{ Use: "wiki", Aliases: []string{"info", "docs", "doc"}, Short: "visit https://httprunner.com", PreRun: func(cmd *cobra.Command, args []string) { setLogLevel(logLev...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/boom.go
parsing/hrp/cmd/boom.go
package cmd import ( "strings" "time" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "golang.org/x/net/context" "github.com/test-instructor/yangfan/parsing/hrp" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" "github.com/test-instructor/yangfan/parsing/hrp/pkg/boomer" ) // boomCmd re...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/run.go
parsing/hrp/cmd/run.go
package cmd import ( "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp" ) // runCmd represents the run command var runCmd = &cobra.Command{ Use: "run $path...", Short: "run API test with go engine", Long: `run yaml/json testcase files for API test`, Example: ` $ hrp run demo.json # r...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/dial.go
parsing/hrp/cmd/dial.go
package cmd import ( "time" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/internal/dial" ) var ( pingOptions dial.PingOptions dnsOptions dial.DnsOptions ) var pingCmd = &cobra.Command{ Use: "ping $url", Short: "run integrated ping command", Args: ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/doc_test.go
parsing/hrp/cmd/doc_test.go
package cmd import ( "testing" "github.com/spf13/cobra/doc" ) // run this test to generate markdown docs for hrp command func TestGenMarkdownTree(t *testing.T) { err := doc.GenMarkdownTree(rootCmd, "../../docs/cmd") if err != nil { t.Fatal(err) } }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/cli/main.go
parsing/hrp/cmd/cli/main.go
package main import ( "os" "time" "github.com/getsentry/sentry-go" "github.com/test-instructor/yangfan/parsing/hrp/cmd" ) func main() { defer func() { if err := recover(); err != nil { // report panic to sentry sentry.CurrentHub().Recover(err) sentry.Flush(time.Second * 5) // print panic trace ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/adb/devices.go
parsing/hrp/cmd/adb/devices.go
package adb import ( "encoding/json" "fmt" "os" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/pkg/uixt" ) func format(data map[string]string) string { result, _ := json.MarshalIndent(data, "", "\t") return string(result) } var listAndroidDevicesCmd = &cobra.Command{ Use: "devic...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/adb/init.go
parsing/hrp/cmd/adb/init.go
package adb import ( "fmt" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/pkg/gadb" "github.com/test-instructor/yangfan/parsing/hrp/pkg/uixt" ) var androidRootCmd = &cobra.Command{ Use: "adb", Short: "simple utils for android device management", PersistentPre...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/adb/screencap.go
parsing/hrp/cmd/adb/screencap.go
package adb import ( "fmt" "io/ioutil" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" ) var screencapAndroidDevicesCmd = &cobra.Command{ Use: "screencap", Short: "Start android screen capture", RunE: func(cmd *cobra.Command, args []string) error { device, err :...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/ios/devices.go
parsing/hrp/cmd/ios/devices.go
package ios import ( "encoding/json" "fmt" "os" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/pkg/gidevice" "github.com/test-instructor/yangfan/parsing/hrp/pkg/uixt" ) type Device struct { d gidevice.Device UDID string `json...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/ios/init.go
parsing/hrp/cmd/ios/init.go
package ios import ( "fmt" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/pkg/gidevice" "github.com/test-instructor/yangfan/parsing/hrp/pkg/uixt" ) var iosRootCmd = &cobra.Command{ Use: "ios", Short: "simple utils for ios device management", } func getDevice(udid string) (gidevice...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/ios/ios_test.go
parsing/hrp/cmd/ios/ios_test.go
//go:build localtest package ios import "testing" func TestGetDevice(t *testing.T) { device, err := getDevice(udid) if err != nil { t.Fatal(err) } t.Logf("device: %v", device) }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/ios/apps.go
parsing/hrp/cmd/ios/apps.go
package ios import ( "fmt" "github.com/mitchellh/mapstructure" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/pkg/gidevice" ) type Application struct { CFBundleVersion string `json:"version"` CFBundleDisplayName string `json:"name"` CFBundleIdentifier string `json:"bundleId"` }...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/ios/xctest.go
parsing/hrp/cmd/ios/xctest.go
package ios import ( "fmt" "os" "os/signal" "syscall" "github.com/pkg/errors" "github.com/rs/zerolog/log" "github.com/spf13/cobra" ) var xctestCmd = &cobra.Command{ Use: "xctest", Short: "run xctest", RunE: func(cmd *cobra.Command, args []string) error { if bundleID == "" { return fmt.Errorf("bundle...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/ios/ps.go
parsing/hrp/cmd/ios/ps.go
package ios import ( "fmt" "time" "github.com/pkg/errors" "github.com/spf13/cobra" ) var psCmd = &cobra.Command{ Use: "ps", Short: "show running processes", PersistentPreRun: func(cmd *cobra.Command, args []string) {}, RunE: func(cmd *cobra.Command, args []string) error { device, er...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/ios/reboot.go
parsing/hrp/cmd/ios/reboot.go
package ios import ( "fmt" "github.com/spf13/cobra" ) var rebootCmd = &cobra.Command{ Use: "reboot", Short: "reboot or shutdown ios device", PersistentPreRun: func(cmd *cobra.Command, args []string) {}, RunE: func(cmd *cobra.Command, args []string) error { device, err := getDevice(udi...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/ios/mount.go
parsing/hrp/cmd/ios/mount.go
package ios import ( "encoding/base64" "fmt" "path/filepath" "strings" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" ) // mountCmd represents the mount command var mountCmd = &cobra.Command{ Use: "mount", Short: "A brief description...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/ios/pcap.go
parsing/hrp/cmd/ios/pcap.go
package ios import ( "os" "os/signal" "syscall" "time" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" "github.com/test-instructor/yangfan/parsing/hrp/internal/env" "github.com/test-instructor/yangfan/parsing/hrp/pkg/uixt" ) var pcapCmd...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/cmd/ios/perf.go
parsing/hrp/cmd/ios/perf.go
package ios import ( "os" "os/signal" "syscall" "time" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" "github.com/test-instructor/yangfan/parsing/hrp/internal/env" "github.com/test-instructor/yangfan/parsing/hrp/pkg/uixt" ) var perfCmd...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/tests/rendezvous_test.go
parsing/hrp/tests/rendezvous_test.go
package tests import ( "testing" "github.com/test-instructor/yangfan/parsing/hrp" ) func TestRendezvous(t *testing.T) { testcase := &hrp.TestCase{ Config: hrp.NewConfig("run request with rendezvous"). SetBaseURL("https://postman-echo.com"). WithVariables(map[string]interface{}{ "n": 5, "a": 12.3, ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/tests/upload_test.go
parsing/hrp/tests/upload_test.go
package tests import ( "testing" "github.com/test-instructor/yangfan/parsing/hrp" ) func TestCaseUploadFile(t *testing.T) { testcase := &hrp.TestCase{ Config: hrp.NewConfig("test upload file to httpbin"). SetBaseURL("https://httpbin.org"). WithVariables(map[string]interface{}{"upload_file": "test.env"}), ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/tests/protocol_test.go
parsing/hrp/tests/protocol_test.go
package tests import ( "testing" "github.com/test-instructor/yangfan/parsing/hrp" ) func TestHTTPProtocol(t *testing.T) { testcase := &hrp.TestCase{ Config: hrp.NewConfig("run request with HTTP/1.1 and HTTP/2"). SetBaseURL("https://postman-echo.com"), TestSteps: []hrp.IStep{ hrp.NewStep("HTTP/1.1 get")....
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/tests/function_test.go
parsing/hrp/tests/function_test.go
package tests import ( "testing" "github.com/test-instructor/yangfan/parsing/hrp" ) func TestCaseCallFunction(t *testing.T) { testcase := &hrp.TestCase{ Config: hrp.NewConfig("run request with functions"). SetBaseURL("https://postman-echo.com"). WithVariables(map[string]interface{}{ "n": 5, "a": 1...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/tests/variables_test.go
parsing/hrp/tests/variables_test.go
package tests import ( "testing" "github.com/test-instructor/yangfan/parsing/hrp" ) func TestCaseConfigVariables(t *testing.T) { testcase := &hrp.TestCase{ Config: hrp.NewConfig("run request with variables"). SetBaseURL("https://postman-echo.com"). WithVariables(map[string]interface{}{ "var1": ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/tests/request_test.go
parsing/hrp/tests/request_test.go
package tests import ( "testing" "github.com/test-instructor/yangfan/parsing/hrp" ) func TestCaseBasicRequest(t *testing.T) { testcase := &hrp.TestCase{ Config: hrp.NewConfig("request methods testcase in hardcode"). SetBaseURL("https://postman-echo.com"). SetVerifySSL(false), TestSteps: []hrp.IStep{ ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/tests/validate_test.go
parsing/hrp/tests/validate_test.go
package tests import ( "testing" "github.com/test-instructor/yangfan/parsing/hrp" ) func TestCaseValidateStep(t *testing.T) { testcase := &hrp.TestCase{ Config: hrp.NewConfig("run request with validation"). SetBaseURL("https://postman-echo.com"). SetVerifySSL(false), TestSteps: []hrp.IStep{ hrp.NewSt...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/tests/extract_test.go
parsing/hrp/tests/extract_test.go
package tests import ( "testing" "github.com/test-instructor/yangfan/parsing/hrp" ) // reference extracted variables for validation in the same step func TestCaseExtractStepSingle(t *testing.T) { testcase := &hrp.TestCase{ Config: hrp.NewConfig("run request with variables"). SetBaseURL("https://postman-echo....
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/myexec/cmd_windows.go
parsing/hrp/internal/myexec/cmd_windows.go
//go:build windows package myexec import ( "fmt" "os" "os/exec" "path/filepath" "strconv" "strings" "syscall" "github.com/pkg/errors" "github.com/rs/zerolog/log" ) func init() { // use python instead of python3 if python3 is not available if !isPython3(python3Executable) { python3Executable = "python" ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/myexec/cmd.go
parsing/hrp/internal/myexec/cmd.go
package myexec import ( "fmt" "os" "os/exec" "path/filepath" "strings" "github.com/pkg/errors" "github.com/rs/zerolog/log" "github.com/test-instructor/yangfan/parsing/hrp/internal/code" "github.com/test-instructor/yangfan/parsing/hrp/internal/env" ) var python3Executable string = "python3" // system defaul...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/myexec/cmd_uixt.go
parsing/hrp/internal/myexec/cmd_uixt.go
//go:build darwin || linux package myexec import ( "fmt" "os" "os/exec" "path/filepath" "syscall" "github.com/pkg/errors" "github.com/rs/zerolog/log" ) func getPython3Executable(venvDir string) string { return filepath.Join(venvDir, "bin", "python3") } func ensurePython3Venv(venv string, packages ...string...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/scaffold/examples_test.go
parsing/hrp/internal/scaffold/examples_test.go
package scaffold import ( "path/filepath" "testing" ) func TestGenDemoExamples(t *testing.T) { dir := "../../../examples/demo-with-go-plugin" err := CreateScaffold(dir, Go, "", true) if err != nil { t.Fatal() } dir = "../../../examples/demo-with-py-plugin" venv := filepath.Join(dir, ".venv") err = CreateS...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/scaffold/main.go
parsing/hrp/internal/scaffold/main.go
package scaffold import ( "embed" "fmt" "os" "path/filepath" "time" "github.com/httprunner/funplugin/fungo" "github.com/pkg/errors" "github.com/rs/zerolog/log" "github.com/test-instructor/yangfan/parsing/hrp" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" "github.com/test-instructor/yan...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/scaffold/templates/plugin/debugtalk.go
parsing/hrp/internal/scaffold/templates/plugin/debugtalk.go
package main import ( "fmt" ) func SumTwoInt(a, b int) int { return a + b } func SumInts(args ...int) int { var sum int for _, arg := range args { sum += arg } return sum } func Sum(args ...interface{}) (interface{}, error) { var sum float64 for _, arg := range args { switch v := arg.(type) { case int...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/scaffold/templates/plugin/debugtalk_gen.go
parsing/hrp/internal/scaffold/templates/plugin/debugtalk_gen.go
// NOTE: Generated By hrp v4.3.3, DO NOT EDIT! package main import ( "github.com/httprunner/funplugin/fungo" ) func main() { fungo.Register("SumTwoInt", SumTwoInt) fungo.Register("SumInts", SumInts) fungo.Register("Sum", Sum) fungo.Register("SetupHookExample", SetupHookExample) fungo.Register("TeardownHookExamp...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/env/env.go
parsing/hrp/internal/env/env.go
package env import ( "os" "path/filepath" "time" ) var ( WDA_USB_DRIVER = os.Getenv("WDA_USB_DRIVER") WDA_LOCAL_PORT = os.Getenv("WDA_LOCAL_PORT") WDA_LOCAL_MJPEG_PORT = os.Getenv("WDA_LOCAL_MJPEG_PORT") VEDEM_OCR_URL = os.Getenv("VEDEM_OCR_URL") VEDEM_OCR_AK = os.Getenv("VEDEM_OCR_...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/version/init.go
parsing/hrp/internal/version/init.go
package version import ( _ "embed" ) //go:embed VERSION var VERSION string // httprunner python version const HttpRunnerMinimumVersion = "v4.3.0"
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/code/code_test.go
parsing/hrp/internal/code/code_test.go
package code import ( "fmt" "testing" ) func TestGetErrorCode(t *testing.T) { err := LoadYAMLError code := GetErrorCode(err) fmt.Println(code) }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/code/code.go
parsing/hrp/internal/code/code.go
package code import ( "github.com/pkg/errors" "github.com/rs/zerolog/log" ) // general: [0, 2) const ( Success = 0 GeneralFail = 1 ) // environment: [2, 10) var ( InvalidPython3Venv = errors.New("prepare python3 venv failed") // 9 ) // loader: [10, 20) var ( LoadFileError = errors.New("load fil...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/builtin/function.go
parsing/hrp/internal/builtin/function.go
package builtin import ( "bytes" "crypto/md5" "encoding/hex" "fmt" "math" "math/rand" "mime" "mime/multipart" "net/textproto" "os" "path/filepath" "regexp" "strings" "time" "github.com/pkg/errors" "github.com/rs/zerolog/log" ) var Functions = map[string]interface{}{ "get_timestamp": getTime...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/builtin/assertion.go
parsing/hrp/internal/builtin/assertion.go
package builtin import ( "fmt" "reflect" "strings" "github.com/stretchr/testify/assert" ) var Assertions = map[string]func(t assert.TestingT, actual interface{}, expected interface{}, msgAndArgs ...interface{}) bool{ "eq": EqualValues, "equals": EqualValues, "equal": Equa...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/builtin/utils.go
parsing/hrp/internal/builtin/utils.go
package builtin import ( "bytes" "crypto/hmac" "crypto/sha256" "encoding/binary" "encoding/csv" builtinJSON "encoding/json" "fmt" "math" "math/rand" "os" "path/filepath" "reflect" "strconv" "strings" "time" "github.com/pkg/errors" "github.com/rs/zerolog/log" "gopkg.in/yaml.v3" "github.com/test-ins...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/builtin/assertion_test.go
parsing/hrp/internal/builtin/assertion_test.go
package builtin import ( "regexp" "testing" "github.com/stretchr/testify/assert" ) func TestStartsWith(t *testing.T) { testData := []struct { raw string expected string }{ {"", ""}, {"a", "a"}, {"abc", "a"}, {"abc", "ab"}, } for _, data := range testData { if !assert.True(t, StartsWith(t, ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/json/json.go
parsing/hrp/internal/json/json.go
package json import ( jsoniter "github.com/json-iterator/go" ) // replace with third-party json library to improve performance var json = jsoniter.ConfigCompatibleWithStandardLibrary var ( Marshal = json.Marshal MarshalIndent = json.MarshalIndent Unmarshal = json.Unmarshal NewDecoder = json.NewDeco...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/wiki/open_linux.go
parsing/hrp/internal/wiki/open_linux.go
package wiki const openCmd = "xdg-open"
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/wiki/open_darwin.go
parsing/hrp/internal/wiki/open_darwin.go
package wiki const openCmd = "open"
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/wiki/open_windows.go
parsing/hrp/internal/wiki/open_windows.go
package wiki const openCmd = "explorer"
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/wiki/main.go
parsing/hrp/internal/wiki/main.go
package wiki import ( "github.com/rs/zerolog/log" "github.com/test-instructor/yangfan/parsing/hrp/internal/myexec" "github.com/test-instructor/yangfan/parsing/hrp/internal/sdk" ) func OpenWiki() error { sdk.SendEvent(sdk.EventTracking{ Category: "OpenWiki", Action: "hrp wiki", }) log.Info().Msgf("%s http...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/dial/dns.go
parsing/hrp/internal/dial/dns.go
package dial import ( "fmt" "io/ioutil" "net" "net/http" "net/url" "path/filepath" "strconv" "strings" "time" "github.com/miekg/dns" "github.com/pkg/errors" "github.com/rs/zerolog/log" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" "github.com/test-instructor/yangfan/parsing/hrp/inte...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/dial/ping.go
parsing/hrp/internal/dial/ping.go
package dial import ( "fmt" "net/url" "path/filepath" "strings" "time" "github.com/go-ping/ping" "github.com/pkg/errors" "github.com/rs/zerolog/log" "github.com/test-instructor/yangfan/parsing/hrp/internal/builtin" "github.com/test-instructor/yangfan/parsing/hrp/internal/env" ) type PingOptions struct { ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/sdk/init.go
parsing/hrp/internal/sdk/init.go
package sdk import ( "fmt" "github.com/denisbrodbeck/machineid" "github.com/getsentry/sentry-go" "github.com/rs/zerolog/log" uuid "github.com/satori/go.uuid" "github.com/test-instructor/yangfan/parsing/hrp/internal/env" "github.com/test-instructor/yangfan/parsing/hrp/internal/version" ) const ( trackingID =...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/sdk/client.go
parsing/hrp/internal/sdk/client.go
package sdk import ( "fmt" "net/http" "net/url" "reflect" "time" ) const ( gaAPIDebugURL = "https://www.google-analytics.com/debug/collect" // used for debug gaAPIURL = "https://www.google-analytics.com/collect" ) type GAClient struct { TrackingID string `form:"tid"` // Tracking ID / Property ID, ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/sdk/client_test.go
parsing/hrp/internal/sdk/client_test.go
package sdk import ( "testing" ) func TestSendEvents(t *testing.T) { event := EventTracking{ Category: "unittest", Action: "SendEvents", Value: 123, } err := SendEvent(event) if err != nil { t.Fatal(err) } } func TestStructToUrlValues(t *testing.T) { event := EventTracking{ Category: "unittest"...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/sdk/events.go
parsing/hrp/internal/sdk/events.go
package sdk import ( "fmt" "net/url" "time" "github.com/test-instructor/yangfan/parsing/hrp/internal/version" ) type IEvent interface { ToUrlValues() url.Values } type EventTracking struct { HitType string `form:"t"` // Event hit type = event Category string `form:"ec"` // Required. Event Category. Action...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/parsing/hrp/internal/pytest/main.go
parsing/hrp/internal/pytest/main.go
package pytest import ( "github.com/test-instructor/yangfan/parsing/hrp/internal/myexec" "github.com/test-instructor/yangfan/parsing/hrp/internal/sdk" ) func RunPytest(args []string) error { sdk.SendEvent(sdk.EventTracking{ Category: "RunAPITests", Action: "hrp pytest", }) args = append([]string{"run"}, a...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/loader.go
hrp/loader.go
package hrp import ( "io/fs" "os" "path/filepath" "strings" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" ) func LoadTestCases(iTestCases ...ITestCase) ([]*TestCase, error) { testCases := make([]*TestCase, 0) for _, iTestCase := range iTestCases { if _, ok :...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/parameters.go
hrp/parameters.go
package hrp import ( "math/rand" "reflect" "strings" "sync" "time" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" ) type TParamsConfig struct { PickOrder iteratorPickOrder `json:"pick_order,omitempty" yaml:"pick_order,omitempty"` // overall pick-order...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/yfCaseToHRP.go
hrp/yfCaseToHRP.go
package hrp import ( "encoding/json" "fmt" "go.uber.org/zap" "github.com/test-instructor/yangfan/server/global" mic "github.com/test-instructor/yangfan/server/model/interfacecase" ) func yangfanTestCaseToHrpCase(testCaseList []mic.HrpCase, debugTalkFilePath string, tcm *ApisCaseModel) error { for _, testCase ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/parser.go
hrp/parser.go
package hrp import ( builtinJSON "encoding/json" "fmt" "net/url" "path" "reflect" "regexp" "strconv" "strings" "github.com/httprunner/funplugin" "github.com/httprunner/funplugin/shared" "github.com/maja42/goval" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap"...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/step_transaction.go
hrp/step_transaction.go
package hrp import ( "fmt" "time" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" ) type Transaction struct { Name string `json:"name" yaml:"name"` Type transactionType `json:"type" yaml:"type"` } type transactionType string const ( transactionStart transactionType = "start" t...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/yfDebugTalk.go
hrp/yfDebugTalk.go
package hrp import ( "errors" "fmt" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/interfacecase" "go.uber.org/zap" "os" "strconv" "sync" "time" ) type debugTalkOperation struct { ID uint ProjectID uint FilePath string filePath string } func ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/runner_test.go
hrp/runner_test.go
package hrp import ( "fmt" "io/ioutil" "os" "path/filepath" "testing" "time" "github.com/stretchr/testify/assert" "github.com/test-instructor/yangfan/hrp/internal/code" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" ) func buildHashicorpGoPlugin() { global.GVA_LOG.Info("build hashico...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/run_json_boom.go
hrp/run_json_boom.go
package hrp func (b *HRPBoomer) InitBoomerYangfan() { b.SetSpawnCount(b.GetProfile().SpawnCount) b.SetSpawnRate(b.GetProfile().SpawnRate) b.SetRunTime(b.GetProfile().RunTime) if b.GetProfile().LoopCount > 0 { b.SetLoopCount(b.GetProfile().LoopCount) } b.SetRateLimiter(b.GetProfile().MaxRPS, b.GetProfile().Requ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/summary.go
hrp/summary.go
package hrp import ( "bufio" _ "embed" "fmt" "html/template" "os" "path/filepath" "runtime" "time" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/test-instructor/yangfan/hrp/internal/builtin" "github.com/test-instructor/yangfan/hrp/internal/version" ) func newOutSummary...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/response.go
hrp/response.go
package hrp import ( "bytes" builtinJSON "encoding/json" "fmt" "io" "net/http" "regexp" "strings" "testing" "github.com/jmespath/go-jmespath" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/test-instructor/yangfan/hrp/internal/builtin" "github.co...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/step_request.go
hrp/step_request.go
package hrp import ( "bytes" "compress/gzip" "compress/zlib" "crypto/tls" "fmt" "io" "net/http" "net/http/httputil" "net/url" "os" "strconv" "strings" "time" "github.com/andybalholm/brotli" "github.com/fatih/color" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.o...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
true
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/step_mobile_ui_test.go
hrp/step_mobile_ui_test.go
//go:build localtest package hrp import ( "testing" ) func TestIOSSettingsAction(t *testing.T) { testCase := &TestCase{ Config: NewConfig("ios ui action on Settings"). SetIOS(WithWDAPort(8700), WithWDAMjpegPort(8800)), TestSteps: []IStep{ NewStep("launch Settings"). IOS().Home().Tap("设置"). Valida...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/boomer.go
hrp/boomer.go
package hrp import ( "fmt" "io/ioutil" "os" "path/filepath" "strconv" "strings" "sync" "time" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/httprunner/funplugin" "golang.org/x/net/context" "github.com/test-instructor/yangfan/hrp/internal/builtin" "github.com/test-ins...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/yfTestCase.go
hrp/yfTestCase.go
package hrp import ( "errors" "fmt" "strconv" "gorm.io/gorm" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/interfacecase" ) func getCaseStep(id uint) (apiCaseStep interfacecase.ApiCaseStep) { global.GVA_DB.Model(&interfacecase.ApiCaseStep{}). Preload("T...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/step_testcase.go
hrp/step_testcase.go
package hrp import ( "fmt" "time" "github.com/jinzhu/copier" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" ) // StepTestCaseWithOptionalArgs implements IStep interface. type StepTestCaseWithOptionalArgs struct { step *TStep } // TeardownHook adds a teardown hook...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/step_mobile_ui.go
hrp/step_mobile_ui.go
package hrp import ( "fmt" "time" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/test-instructor/yangfan/hrp/internal/code" "github.com/test-instructor/yangfan/hrp/pkg/uixt" ) // ios setting options var ( WithUDID = uixt.WithUDI...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/run_json.go
hrp/run_json.go
package hrp import ( "bytes" "encoding/json" "fmt" "io/ioutil" "os" "path/filepath" "time" "github.com/pkg/errors" "github.com/test-instructor/yangfan/hrp/internal/builtin" "github.com/test-instructor/yangfan/hrp/internal/code" "github.com/test-instructor/yangfan/hrp/internal/sdk" "github.com/test-instruc...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/config.go
hrp/config.go
package hrp import ( "reflect" "time" "github.com/test-instructor/yangfan/hrp/internal/builtin" "github.com/test-instructor/yangfan/hrp/pkg/uixt" ) // NewConfig returns a new constructed testcase config with specified testcase name. func NewConfig(name string) *TConfig { return &TConfig{ Name: name, En...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false