Files
httprunner/hrp/pkg/convert/to_json.go
2022-12-23 12:28:29 +08:00

14 lines
313 B
Go

package convert
import "github.com/httprunner/httprunner/v4/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
}