docs(sdlc): record real test results, open defects ISS-029–032, conditional acceptance
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// SI work products 11–22.
|
||||
import { P, CODE, PROJECT_TH, ORGANIZER, ORGANIZER_PM, RECORDER, START, END, SCOPE, CRS, crTopic, TEST_FROM, TEST_TO, ACCEPT_DATE, DEV_BASELINE, BASELINE_COMMIT, TEST_STATE_COMMIT, ORIGIN, BACKUP } from './project.mjs';
|
||||
import { SR_GROUPS, SRS, srTopic, UNIT_GROUPS, UNITS, unitTopic, unitModule, TEST_CASES, traceOf } from './engineering.mjs';
|
||||
import { SR_GROUPS, SRS, srTopic, UNIT_GROUPS, UNITS, unitTopic, unitModule, TEST_CASES, traceOf, testResult, resultCounts, crStatus } from './engineering.mjs';
|
||||
import { CORRECTIONS } from './history.mjs';
|
||||
import { figure } from './figures.mjs';
|
||||
import { bud, thLong, thShort, thRange, thRangeLong, table, bullets, numbered } from './lib.mjs';
|
||||
@@ -81,7 +81,7 @@ export function softwareDesign() {
|
||||
figure('useCase'),
|
||||
table(['Actor', 'คำอธิบาย', 'การใช้งานหลัก'], [
|
||||
['Owner', 'เจ้าของบริษัท สิทธิ์สูงสุดภายในบริษัท', 'ตั้งค่าบริษัท จัดการผู้ใช้ และใช้งานทุกโมดูล'],
|
||||
['Admin', 'ผู้ดูแลระบบภายในบริษัท', 'จัดการข้อมูลหลัก ผู้ใช้ สิทธิ์ และใช้งานทุกโมดูลปฏิบัติการ'],
|
||||
['Admin', 'ผู้ดูแลระบบภายในบริษัท', 'จัดการข้อมูลหลักและใช้งานทุกโมดูลปฏิบัติการ (การจัดการผู้ใช้และสิทธิ์เป็นของ Owner)'],
|
||||
['Staff', 'ผู้ปฏิบัติงาน', 'บันทึกรายการคลังสินค้า ขาย จัดซื้อ และการเงินตามสิทธิ์'],
|
||||
['Viewer', 'ผู้ใช้แบบอ่านอย่างเดียว', 'ดูหน้าจอและรายงานที่ได้รับสิทธิ์'],
|
||||
['System Scheduler', 'ผู้กระทำอัตโนมัติ (Node.js)', 'สรุปยอดสต๊อก/GL และแจ้งเตือนตามกำหนดเวลา'],
|
||||
@@ -299,10 +299,14 @@ export function testReport() {
|
||||
const date = '2026-08-14';
|
||||
const tested = CRS.filter(([id]) => traceOf(id).tcs.length);
|
||||
const byDocument = CRS.length - tested.length;
|
||||
const rows = tested.map(([id, text], i) => {
|
||||
const t = traceOf(id);
|
||||
return [i + 1, t.tc, `ตรวจสอบ ${t.un.map(unitTopic).join(' / ')}`, id, text, 'Passed', thRangeLong(TEST_FROM, TEST_TO)];
|
||||
const count = resultCounts();
|
||||
const crsOf = (tc) => CRS.filter(([id]) => traceOf(id).tcs.includes(tc)).map(([id]) => id).join(', ') || '-';
|
||||
const rows = TEST_CASES.map(([tc, unit], i) => {
|
||||
const r = testResult(tc);
|
||||
return [i + 1, tc, unitTopic(unit), crsOf(tc), r.actual, r.status, r.status === 'Not tested' ? '-' : thRangeLong(TEST_FROM, TEST_TO)];
|
||||
});
|
||||
const failed = TEST_CASES.filter(([tc]) => testResult(tc).status === 'Failed');
|
||||
const issues = [...new Set(failed.map(([tc]) => testResult(tc).issue))];
|
||||
return {
|
||||
dir: '2-SI Process (12 Work Product)/16.Test Report',
|
||||
name: `${CODE} Test Report ${bud(date)} V1.0 PaNg`,
|
||||
@@ -324,27 +328,28 @@ export function testReport() {
|
||||
[2, 'Non-Functional Test', 'ประสิทธิภาพ, ความปลอดภัย (สิทธิ์/TLS/การเข้ารหัสรหัสผ่าน), การแยกข้อมูล, การสำรองและกู้คืน'],
|
||||
[3, 'Environment', 'Internal Testing Server (PHP 8, MariaDB, Node.js)'],
|
||||
[4, 'ช่วงเวลา', `รอบทดสอบระบบ ${thRangeLong(TEST_FROM, TEST_TO)}`],
|
||||
[5, 'Baseline ที่ใช้ทดสอบ', `สถานะ Repository ที่ใกล้เคียงที่สุด Commit \`${TEST_STATE_COMMIT}\``],
|
||||
[5, 'Build ที่ใช้ทดสอบ', `Commit \`${TEST_STATE_COMMIT}\` บน Branch main (การแก้ไขโค้ดล่าสุดก่อนรอบทดสอบ)`],
|
||||
], ['c']),
|
||||
'## สรุปผลการทดสอบ',
|
||||
table(['รายการ', 'จำนวน'], [
|
||||
['Test Case ที่กำหนดทั้งหมด', TEST_CASES.length],
|
||||
['ดำเนินการทดสอบ', TEST_CASES.length],
|
||||
['ผ่าน (Passed)', TEST_CASES.length],
|
||||
['ไม่ผ่าน (Failed)', 0],
|
||||
['ค้าง (Blocked / Pending)', 0],
|
||||
['ดำเนินการทดสอบ', count.Passed + count.Failed],
|
||||
['ผ่าน (Passed)', count.Passed],
|
||||
['ไม่ผ่าน (Failed)', count.Failed],
|
||||
['ยังไม่ได้ทดสอบ (ฟังก์ชันส่งมอบหลังรอบทดสอบ)', count['Not tested']],
|
||||
], ['', 'r']),
|
||||
'## Verification Items',
|
||||
table(['No', 'Test Case', 'Software Testing', 'Customer Req. ID', 'Customer Req. Topic', 'Status', 'Test Date'], rows, ['c', 'c', '', 'c', '', 'c', 'c']),
|
||||
table(['No', 'Test Case', 'Software Unit', 'Customer Req. ID', 'Actual Result', 'Status', 'Test Date'], rows, ['c', 'c', '', '', '', 'c', 'c']),
|
||||
`ความต้องการที่ยืนยันด้วย Test Case มี ${tested.length} รายการ ส่วนอีก ${byDocument} รายการเป็นความต้องการด้านเอกสาร การอบรม และหลักฐานด้านคุณภาพ ซึ่งยืนยันด้วยเอกสารส่งมอบตามที่ระบุใน Traceability Record และได้รับการยืนยันจากลูกค้าใน Validation Results`,
|
||||
'## Summary',
|
||||
table(['No', 'Topic', 'Detail'], [
|
||||
[1, 'Test Case', `ทดสอบตาม Customer Requirements ผ่านทั้งหมด ${TEST_CASES.length} Test Case คิดเป็น 100%`],
|
||||
[2, 'Pending', 'ไม่พบข้อผิดพลาด (Fail) หรือรายการค้าง (Pending) ในรอบการทดสอบนี้'],
|
||||
[3, 'Conclusion', 'ผลการทดสอบสรุปได้ว่าระบบพร้อมสำหรับ UAT และการส่งมอบ เนื่องจากผลการทดสอบผ่านครบ 100% และเป็นไปตาม Project Plan'],
|
||||
[1, 'Test Case', `ทดสอบ ${count.Passed + count.Failed} จาก ${TEST_CASES.length} Test Case ผ่าน ${count.Passed} ไม่ผ่าน ${count.Failed}`],
|
||||
[2, 'Failed', `${failed.map(([tc]) => tc).join(', ')} บันทึกเป็นข้อบกพร่องคงค้าง ${issues.join(', ')} ใน Correction Register`],
|
||||
[3, 'Not tested', `${TEST_CASES.filter(([tc]) => testResult(tc).status === 'Not tested').map(([tc]) => tc).join(', ')} ฟังก์ชันส่งมอบหลังรอบทดสอบ (Task 4.7) ต้องทดสอบก่อนใช้งาน`],
|
||||
[4, 'Conclusion', 'ฟังก์ชันหลักผ่านการทดสอบ แต่ยังมีข้อบกพร่องด้านความปลอดภัยและความถูกต้องของข้อมูลคงค้าง ต้องแจ้งผู้รับมอบและกำหนดการแก้ไขก่อนตรวจรับ'],
|
||||
], ['c']),
|
||||
'## หลักฐานประกอบทางอ้อม',
|
||||
`Correction Register บันทึกการแก้ไขข้อบกพร่องที่พบระหว่างพัฒนา ${CORRECTIONS.length} รายการ ซึ่งได้รับการแก้ไขและตรวจสอบผลด้วย Test Case ที่เกี่ยวข้องครบทุกรายการ`,
|
||||
`Correction Register บันทึกข้อบกพร่อง ${CORRECTIONS.length} รายการ แก้ไขแล้ว ${CORRECTIONS.filter((c) => c[2]).length} รายการ และคงค้างจากรอบทดสอบนี้ ${CORRECTIONS.filter((c) => !c[2]).length} รายการ`,
|
||||
].join('\n\n'),
|
||||
secretary: P.PaNg, reviewer: P.NoC, approver: P.SeV,
|
||||
}),
|
||||
@@ -382,8 +387,8 @@ export function software() {
|
||||
table(['ลำดับ', 'หลักฐาน', 'รายละเอียด'], [
|
||||
[1, 'Source Code และ Baseline', `Commit \`${BASELINE_COMMIT}\` ควบคุมใน Repository หลักและสำรอง`],
|
||||
[2, 'ชุดติดตั้งระบบ', 'Docker Compose Stack และสคริปต์ `setup.php` สำหรับสร้างฐานข้อมูล'],
|
||||
[3, 'ผลการทดสอบระบบ', `Test Report ${TEST_CASES.length} Test Case ผ่านทั้งหมด`],
|
||||
[4, 'ผลการทดสอบการยอมรับ', `Validation Results ครบ 14 หมวด ${CRS.length} รายการ ผ่านทั้งหมด`],
|
||||
[3, 'ผลการทดสอบระบบ', (({ Passed: ok, Failed: bad, 'Not tested': none }) => `Test Report ${TEST_CASES.length} Test Case ผ่าน ${ok} ไม่ผ่าน ${bad} ยังไม่ได้ทดสอบ ${none}`)(resultCounts())],
|
||||
[4, 'ผลการทดสอบการยอมรับ', (() => { const s = CRS.map(([id]) => crStatus(id, date)); const n = (x) => s.filter((v) => v === x).length; return `Validation Results ${CRS.length} รายการ ผ่าน ${n('Passed')} ไม่ผ่าน ${n('Failed')} ยังไม่ได้ทดสอบ ${n('Not tested')} รอดำเนินการ ${n('Pending')}`; })()],
|
||||
[5, 'การตรวจรับส่งมอบ', `เสนอ Project Sponsor ตรวจรับตามแผนในวันที่ ${thLong(ACCEPT_DATE)} (Acceptance Report)`],
|
||||
[6, 'คู่มือประกอบการใช้งาน', 'Software User Document, Product Operation Guide, Maintenance Document'],
|
||||
], ['c']),
|
||||
|
||||
Reference in New Issue
Block a user