feat: add har2case command

This commit is contained in:
debugtalk
2021-10-11 15:36:02 +08:00
parent 69e01373d3
commit a647fe67b0
2 changed files with 81 additions and 0 deletions

24
har2case/main_test.go Normal file
View File

@@ -0,0 +1,24 @@
package har2case
import (
"log"
"os"
"testing"
)
var harPath string
func TestMain(m *testing.M) {
harPath = "demo.har"
// run all tests
code := m.Run()
defer os.Exit(code)
// teardown
}
func TestGenJSON(t *testing.T) {
jsonPath, err := NewHAR(harPath).GenJSON()
log.Printf("jsonPath: %v, err: %v", jsonPath, err)
}