CodeworkStatisticSerializer.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const makeId = require("../../util/makeId");
  2. /**
  3. * @description 代码作业的统计信息
  4. * @property {number} tolerateCommit 目前还可以允许的不规范git提交次数
  5. * @property {number} branch git分支部分的规范情况得分
  6. * @property {number} commitMessage git提交部分的规范情况得分
  7. * @property {number} buildSuccess 构建成功次数
  8. * @property {number} buildFailure 构建失败次数
  9. * @property {number} prodUnitTestSuccess 生产环境下单元测试(包含生产环境的隐藏用例)成功次数
  10. * @property {number} prodUnitTestFailure 生产环境下单元测试(包含生产环境的隐藏用例)失败次数
  11. * @property {number} otherUnitTestSuccess 其他环境下单元测试成功次数
  12. * @property {number} otherUnitTestFailure 其他环境下单元测试失败次数
  13. * @property {number} functionalTestSuccess 功能测试成功次数
  14. * @property {number} functionalTestFail 功能测试成功次数
  15. * @property {Object} prodUnitTestRecords 生产环境单元测试记录
  16. * @property {Object} otherUnitTestRecords 其他环境单元测试记录
  17. * @property {Object} functionTestRecords 功能测试记录
  18. * @property {Object} buildRecords 构建记录列表
  19. *
  20. */
  21. module.exports = () => {
  22. return {
  23. codeWorkId: makeId(),
  24. groupId: makeId(),
  25. tolerateCommit: 8,
  26. branch: 82,
  27. commitMessage: 95,
  28. buildSuccess: 12,
  29. buildFailure: 8,
  30. prodUnitTestSuccess: 12,
  31. prodUnitTestFailure: 9,
  32. otherUnitTestSuccess: 4,
  33. otherUnitTestFailure: 20,
  34. functionalTestSuccess: 12,
  35. functionalTestFail: 9,
  36. prodUnitTestRecords: [],
  37. otherUnitTestRecords: [],
  38. functionTestRecords: [],
  39. buildRecords: []
  40. };
  41. };