-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: scene set supports parallel in autoTest #2173
feature: scene set supports parallel in autoTest #2173
Conversation
Automated cherry pick can ONLY be triggered when this PR is MERGED! |
f24ea3d
to
de98051
Compare
Codecov Report
@@ Coverage Diff @@
## master #2173 +/- ##
==========================================
- Coverage 15.96% 15.62% -0.35%
==========================================
Files 1200 1213 +13
Lines 119118 122483 +3365
==========================================
+ Hits 19021 19132 +111
- Misses 98143 101396 +3253
- Partials 1954 1955 +1
|
28afced
to
95b2e4d
Compare
apistructs/sceneset.go
Outdated
SceneSetsAutotestExecType = "sceneSets" | ||
SceneAutotestExecType = "scene" | ||
|
||
nameMaxLength int = 50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xxxNameMaxLength
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
modules/dop/dao/testplan_v2_step.go
Outdated
var step, nextStep TestPlanV2Step | ||
defer func() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong usage of defer function with error. You never have chance to handle defer error.
Should change to:
return client.Transaction(func(tx *grom.DB) (err error) {
defer func() {
if err == nil {
err = updateStepGroup(tx, step.GroupID)
}
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
modules/dop/dao/testplan_v2_step.go
Outdated
return client.Transaction(func(tx *gorm.DB) (err error) { | ||
var oldGroupID, newGroupID uint64 | ||
// update step groupID in the group if isGroup is false | ||
defer func() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
modules/dop/endpoints/endpoints.go
Outdated
@@ -407,6 +407,7 @@ func (e *Endpoints) Routes() []httpserver.Endpoint { | |||
{Path: "/api/autotests/testplans/{testPlanID}/actions/move-step", Method: http.MethodPut, Handler: e.MoveTestPlanV2Step}, | |||
{Path: "/api/autotests/testplans-step/{stepID}", Method: http.MethodGet, Handler: e.GetTestPlanV2Step}, | |||
{Path: "/api/autotests/testplans-step/{stepID}", Method: http.MethodPut, Handler: e.UpdateTestPlanV2Step}, | |||
{Path: "/api/autotests/testplans-steps/{testPlanID}/actions/by-groupID", Method: http.MethodGet, Handler: e.ListTestPlanV2Step}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad restful api.
maybe /api/autotests/testplans/{testPlanID}/steps/actions/list-by-group-id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
58bb27e
to
2914ee6
Compare
/approve |
/cherry-pick release/1.3 |
* feature: scene set supports parallel in autoTest * add ListTestPlanV2Step api * update move group * add split op of render * fix: add unit test * add unit test * add unit test for render * add migrations * polish code * fix: update timeout of Test_initCron
* feature: scene set supports parallel in autoTest * add ListTestPlanV2Step api * update move group * add split op of render * fix: add unit test * add unit test * add unit test for render * add migrations * polish code * fix: update timeout of Test_initCron Co-authored-by: littlejian <17816869670@163.com>
…t#2173) (erda-project#2412)" This reverts commit cb7aafe.
…t#2173) (erda-project#2412)" This reverts commit cb7aafe.
/cherry-pick release/1.3 |
* feature: scene set supports parallel in autoTest * add ListTestPlanV2Step api * update move group * add split op of render * fix: add unit test * add unit test * add unit test for render * add migrations * polish code * fix: update timeout of Test_initCron
* feature: scene set supports parallel in autoTest * add ListTestPlanV2Step api * update move group * add split op of render * fix: add unit test * add unit test * add unit test for render * add migrations * polish code * fix: update timeout of Test_initCron Co-authored-by: littlejian <17816869670@163.com>
What type of this PR
/kind feature
What this PR does / why we need it:
feature: scene set supports parallel in autoTest
Which issue(s) this PR fixes:
自动化测试计划中,场景集支持并行
Specified Reviewers:
/assign @sfwn
ChangeLog
Need cherry-pick to release versions?
/cherry-pick release/1.3
Add comment like
/cherry-pick release/1.0
when this PR is merged.