Validation, verification and trace tables
הוצג
9:16
מחזור חיי פיתוח התוכנה
כל אפליקציה בטלפון שלך נכתבה על ידי מישהו כמו זה. אך הם לא התחילו בקלידת קוד. לפני השורה הראשונה, הבעיה נחקרה, הפתרון…
קריינות באנגלית · כתוביות באנגלית ובסינית 中文 שאפשר להחליף ביניהן
בשיעור הזה
| English | משמעות |
|---|---|
| data/ˈdeɪtə/ | Recorded facts, observations or values used for analysis or processing. |
| Validation/ˌvælɪˈdeɪʃn/ | Checking whether data meets specified rules for acceptable values or format. |
| verification/ˌverɪfɪˈkeɪʃn/ | Checking that data has been entered or copied accurately from its source, rather than deciding whether the source itself is correct. |
| trace table/treɪs ˈteɪbl/ | טבלת עקבה |
| algorithm/ˈælɡərɪθəm/ | A finite sequence of precise steps for solving a problem or carrying out a task. |
| Range check/reɪndʒ tʃek/ | |
| length check/leŋθ tʃek/ | בדיקת אורך |
| type check/taɪp tʃek/ | |
| presence check/ˈprezəns tʃek/ | בדיקת נוכחות |
| format check/ˈfɔːmæt tʃek/ | |
| check digit/tʃek ˈdɪdʒɪt/ | |
| Visual check/ˈvɪʒuːəl tʃek/ | A person compares the typed data with the original. |
| Double entry/ˈdʌbl ˈentri/ | The data is entered twice and the two copies are compared. |
| test data/test ˈdeɪtə/ | נתוני בדיקה |
| variable's | |
| normal/ˈnɔːml/ | In testing, ordinary valid input that should be accepted and produce the expected result. |
| abnormal/əbˈnɔːml/ | In testing, invalid or unsuitable input that the program should reject or handle appropriately. |
| extreme/ekˈstriːm/ | |
| boundary/ˈbaʊndəri/ | Input values at, just inside or just outside an allowed limit, used to check a program's handling of its valid range. |
| program/ˈprəʊɡræm/ | A set of instructions specifying operations for a computer to carry out. |
בדיקה וניטור
- כאשר נתונים מוזנים, אנו בודקים אותם כדי להפחית טעויות.
- התקפות בודקות שהנתונים סבירים; אימות בודד שהם הועתקו נכון.
- טבלת ניטור עוקבת אחרי האלגוריתם צעד אחר צעד.
התקפות
- התקפות בודקת שהנתונים הם סבירים ועומדים בכללים (לא ניתן לבדוק שהנתונים אמת).
- בדיקת טווח (בין גבולות), בדיקת אורך (מספר תווים נכון), בדיקת סוג (סוג נתונים נכון), בדיקת נוכחות (לא ריק), בדיקת פורמט (תבנית נכונה, למשל יום/חודש/שנה), ובדיקת ספרת בדיקה (ספרה נוספת המאשרת מספר).

כל אלגוריתם מתפר לקלט, עיבוד ופלט – כאן, חישוב הממוצע של שלוש ציונים.

Checking that an age is between 0 and 120 is a:
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
A range check confirms a value lies within allowed limits.
Match each validation check to its purpose.
רמת קושי 2/5 · 140 מטבעות + בונוס קטן בהשלמה הראשונה היום
Presence = not blank; type = right kind of data; format = right pattern.
אימות
- אימות בודק שהנתונים הועתקו או הוזנו נכון (ללא טעאות הקלדה).
- בדיקה ויזואלית — אדם משווה את הנתונים שהוקלדו לאלפיונים עם המקור.
- כניסה כפולה — הנתונים מוקלדים פעמיים והשתי העותקים נבדקו זה מול זה.

חיפוש ליניארי בודק כל פריט בתורו מהתחלה עד למציאת הערך.
Double entry of data is a validation check.
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
False. Double entry is a verification check: it confirms data was entered correctly. Validation checks that data is sensible, such as a range or type check.
Entering data twice and comparing the two copies is:
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
Double entry is a verification method — the two copies must match.
טבלאות מעקב ומבחן נתונים
- טבלת מעקב מתעדת את ערכי המשתנים בזמן ביצוע האלגוריתם — לבדיקת תפקודו או להבנת התנהגותו.
- סוגי מבחן נתונים: רגיל (מתקבל), בלתי רגיל (נדחה), קיצוני (הערך הגדול/קטן ביותר המותר), גבולי (הערכים בשתי צדדי גבול, לדוגמה 120 ו-121).

טבלת מעקב מתעדת את ערכי המשתנים בזמן ריצת התוכנית

Fill in a trace table
A trace table follows the variables one line at a time. Step through and watch the counter and the running total change — exactly the skill a trace-table exam question tests.
A trace table is used to:
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
Tracing helps you check an algorithm works, or work out what it does, by following the variables.
Trace total = 0; FOR i = 1 TO 5: total = total + i. What is total at the end?
רמת קושי 2/5 · 140 מטבעות + בונוס קטן בהשלמה הראשונה היום
1+2+3+4+5 = 15 — the value the trace table builds up row by row.
הכרטיס הזה חדש, לכן הוא מוצג באנגלית עד שהתרגום שלו יהיה מוכן.
Worked example: test data for an exam mark
A program accepts whole-number exam marks from 0 to 100. Give one value of each type of test data.
- Normal: 57 (accepted). Abnormal: −8 or "ten" (rejected). Extreme: 0 and 100, the smallest and largest allowed values (accepted).
- Boundary: test each side of each limit: 100 (accepted) and 101 (rejected); 0 (accepted) and −1 (rejected). The check used is a range check 范围检查, plus a type check for "ten".

A program accepts ages 18 to 65. Which pair is boundary test data for the upper limit?
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
Boundary data sits on each side of a limit: 65 should be accepted and 66 rejected.
Typing a new password twice is a validation check.
רמת קושי 1/5 · 100 מטבעות + בונוס קטן בהשלמה הראשונה היום
Double entry is verification: it checks the data was copied correctly, not that it is sensible.
הבנתך מושלמת
- אימות = האם זה הגיוני? (טווח, אורך, סוג, קיום, פורמט, ספרת ביקורת)
- בדיקה = האם הועתק נכון? (בדיקה ויזואלית, כניסה כפולה)
- טבלת מעקב עוקבת אחרי ערכי המשתנים צעד אחר צעד
- מבחן נתונים: רגיל, בלתי רגיל, קיצוני, גבולי
מה השתבש? רק צוות האתר רואה זאת.