mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-07 16:59:34 +08:00
fix: check testcase format
This commit is contained in:
@@ -60,14 +60,17 @@ func (path *TestCasePath) ToTestCase() (*TestCase, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tc.Config == nil {
|
||||
tc.Config = &TConfig{Name: "testcase name"}
|
||||
if tc.TestSteps == nil {
|
||||
return nil, errors.New("invalid testcase format, missing teststeps!")
|
||||
}
|
||||
|
||||
err = tc.MakeCompat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tc.Config == nil {
|
||||
tc.Config = &TConfig{Name: "please input testcase name"}
|
||||
}
|
||||
tc.Config.Path = casePath
|
||||
|
||||
testCase := &TestCase{
|
||||
|
||||
Reference in New Issue
Block a user