Teori dan Implementasi White Box Testing | Uji Kualitas Perangkat Lunak

Teori dan Implementasi White Box Testing | Uji Kualitas Perangkat Lunak

Introduction to Web Box Testing

In this section, we will learn about web box testing, which is a method used by testers to evaluate software. We will explore different techniques and methods used in white-box testing.

White-Box Testing

  • White-box testing involves examining the internal structure, procedures, and algorithms of a software program.
  • It requires knowledge of the program's modules, code, and steps involved in its execution.
  • The goal is to understand how the program works internally and ensure that each line of code is executed at least once.
  • White-box testing can be combined with black-box testing for comprehensive evaluation.

Black-Box Testing in White-Box Testing

  • Black-box testing is also performed within white-box testing to validate input-output data.
  • Test cases are generated based on expected inputs and outputs.
  • The driver program is used to execute the tests and check if the output matches expectations.
  • Any errors encountered during testing are documented for further analysis and improvement.

Importance of White-Box Testing

  • White-box testing helps understand the internal workings of software.
  • It ensures that all conditions and branches within the program are tested at least once.
  • It verifies the accuracy of program logic and evaluates complex programs effectively.

Techniques in White Box Testing

This section explores different techniques used in white-box testing, including basis path testing, control flow graph, cyclomatic complexity, and test case generation.

Basis Path Testing

  • Basis path testing determines independent paths through a program's control flow graph (CFG).
  • CFG represents the logical flow of a program using nodes (statements) connected by edges (transitions).
  • Independent paths are identified to ensure all possible scenarios are covered during testing.

Control Flow Graph (CFG)

  • CFG is a graphical representation of a program's control flow.
  • It consists of nodes and edges that depict the sequence of statements and decision points in the program.
  • CFG serves as the basis for calculating cyclomatic complexity.

Cyclomatic Complexity

  • Cyclomatic complexity measures the logical complexity of a program.
  • It is calculated using the number of regions in the control flow graph.
  • Higher cyclomatic complexity indicates increased testing effort required.

Test Case Generation

  • Test cases are generated based on the identified paths, logic, and data structures within a program.
  • The goal is to ensure thorough testing by covering all possible scenarios and conditions.
  • Test cases are evaluated against expected outputs to validate program functionality.

Program Flowgraph and Symbol Usage

This section focuses on program flowgraphs and symbol usage in white-box testing.

Program Flowgraph

  • A program flowgraph represents the control flow through a program using nodes and edges.
  • Nodes represent statements or actions, while edges depict transitions between them.
  • Flowgraphs serve as a basis for understanding program execution paths.

Symbol Usage in Flowcharts

  • Flowcharts use symbols to represent different elements of a program's logic.
  • Symbols include start/end points, processes, decisions, input/output operations, etc.
  • These symbols help visualize the structure and flow of algorithms within programs.

Conclusion

White-box testing is an essential technique for evaluating software by examining its internal structure. Techniques such as basis path testing, control flow graphs, cyclomatic complexity analysis, and test case generation aid in comprehensive evaluation. Understanding program flowgraphs and symbol usage enhances our ability to analyze and test software effectively.

Branching and Conditions

This section discusses branching and conditions in programming, specifically focusing on the use of if-else statements. The speaker explains that branching involves two possibilities: one for when a condition is true (if) and another for when it is false (else). The number of conditions depends on the specific program.

If-Else Statements

  • If-else statements are used to create branches in programming.
  • There can be multiple conditions depending on the program's requirements.
  • Cash transactions usually involve more conditions compared to other types of transactions.

Testing and Positive/Negative Outcomes

  • Testing is done to determine whether a condition is true or false.
  • Positive outcomes lead to executing certain code blocks, while negative outcomes lead to executing different code blocks.
  • Repeat-until loops can also be used for file operations or other repetitive tasks.

Flowchart Creation

  • Flowcharts help visualize the logic of a program.
  • Each step in the flowchart represents a specific action or decision point.
  • Notations are used to represent different elements in the flowchart.

Looping and Repeating

This section focuses on looping and repeating actions in programming. The speaker explains how loops can be used to repeat certain actions until a specific condition is met. They also discuss the concept of independent sequences within loops.

While Loops

  • While loops are used for repetitive actions that continue until a certain condition is met.
  • The speaker gives an example of using while loops with numbers from 1 to 11.

Independent Sequences

  • Within a loop, there can be independent sequences that follow their own logic.
  • These independent sequences can have their own set of actions or decisions.

Counting Regions in Flowcharts

This section discusses counting regions in flowcharts as a way to measure complexity. The speaker explains how to count the number of regions and independent parts within a flowchart.

Counting Regions

  • Counting regions helps determine the complexity of a flowchart.
  • The formula for counting regions is: Number of Hits - Number of Nots + 2.
  • Each region represents a closed area in the flowchart.

Independent Parts

  • Independent parts within a flowchart have their own sequence of actions or decisions.
  • These parts can be counted separately from the main flowchart.

Flowgraph Analysis

This section discusses analyzing flowgraphs and understanding their structure. The speaker explains how to identify different elements within a flowgraph, such as notes and connections between them.

Analyzing Flowgraphs

  • Flowgraphs can be analyzed by examining the connections between notes.
  • Connections are represented by arrows indicating control flow.

Notes and Regions

  • Notes represent specific actions or decision points in the program.
  • Regions are groups of connected notes that form closed areas in the flowgraph.

Complexity Calculation

This section focuses on calculating complexity in programming using formulas. The speaker explains how to calculate complexity based on the number of hits, nots, and edges in a program's flowgraph.

Complexity Calculation Formula

  • The formula for calculating complexity is: Number of Hits - Number of Nots + 2.
  • Complexity is determined by analyzing the logical structure of a program's flowgraph.

Edge Counting

  • Edges represent connections between different notes in a program's flowgraph.
  • Edge counting helps determine the overall complexity of a program.

Independent Sequences in Flowcharts

This section discusses independent sequences within flowcharts. The speaker explains how these sequences can be identified and analyzed separately from the main flowchart.

Independent Sequences

  • Independent sequences within a flowchart have their own logic and actions.
  • These sequences can be identified by analyzing the connections between notes.

Analyzing Independent Sequences

  • Independent sequences can be analyzed separately from the main flowchart.
  • Each independent sequence follows its own set of actions or decisions.

Regions in Flowcharts

This section focuses on regions in flowcharts and how they contribute to program complexity. The speaker explains how to identify different regions within a flowchart and analyze their impact on program logic.

Identifying Regions

  • Regions are closed areas within a flowchart that represent specific sections of program logic.
  • They can be identified by examining the connections between notes.

Impact on Program Logic

  • Different regions within a flowchart contribute to the overall program logic.
  • Analyzing regions helps understand the complexity and structure of a program.

New Section

This section discusses the concept of branching in programming and how it can be used to handle different conditions.

Branching in Programming

  • Branching is a programming concept that involves making decisions based on certain conditions.
  • In branching, there are two main branches: "if" and "else".
  • The number of branches depends on the number of conditions in a program.
  • Cash flow can also affect the number of branches.
  • Standardization is important when using branching.

New Section

This section explains how cash flow affects the use of branching in programming.

Cash Flow and Branching

  • Cash flow often determines the number of branches in a program.
  • Cash transactions usually involve more conditions compared to non-cash transactions.
  • The difficulty lies in determining the condition for each part.

New Section

This section explores different forms of branching and their applications.

Different Forms of Branching

  • Branching can take various forms depending on its purpose.
  • Testing is done initially to determine if a condition is true or false.
  • Positive testing leads to further code execution, while negative testing redirects to another part.
  • The structure can be represented as a flowchart.

New Section

This section discusses the use of repeat-until loops for file handling and checking conditions repeatedly.

Repeat-until Loops

  • Repeat-until loops are used when an action needs to be performed at least once before checking a condition.
  • If the condition is true, it proceeds to the next program; otherwise, it goes back for reevaluation.
  • It is useful for file handling or performing actions until specific criteria are met.

New Section

This section explains the importance of understanding the initial steps in creating a flowchart program.

Understanding Initial Steps

  • The first step in creating a flowchart program is to perform certain actions.
  • These actions are performed initially and may involve printing or checking conditions.
  • It is crucial to understand the notation used in each algorithm.

New Section

This section demonstrates an example of a flowchart program.

Example Flowchart Program

  • An example flowchart program is shown, consisting of numbers arranged sequentially.
  • The program determines if a specific condition is met and proceeds accordingly.
  • If the condition is true, it finishes; otherwise, it follows another path.

New Section

This section discusses the use of while loops for repetitive actions until a specific condition is met.

While Loops

  • While loops are used when an action needs to be repeated until a condition becomes false.
  • It allows for continuous execution until the desired outcome is achieved.
  • In this case, while loops are used to repeat actions until reaching number 10.

New Section

This section explores how multiple while loops can be combined to create complex programs.

Combining While Loops

  • Multiple while loops can be combined to create more complex programs.
  • Each loop has its own independent sequence of actions.
  • The order of execution follows the sequence defined by the loops' arrangement.

New Section

This section explains the difference between sequential and independent flows in programming.

Sequential vs. Independent Flows

  • Sequential flows are executed one after another in a single pass.
  • Independent flows have their own sequences and can be executed simultaneously or independently from other flows.
  • The difference lies in how the program is structured and executed.

New Section

This section discusses the importance of understanding the differences in conditions when creating a flowchart program.

Understanding Different Conditions

  • Different conditions have different implications in a flowchart program.
  • It is important to differentiate between conditions to ensure accurate execution.
  • The example given demonstrates how different conditions affect the flow of the program.

New Section

This section explains how to calculate the number of notes and regions in a flowgraph.

Calculating Notes and Regions

  • To calculate the number of notes, count each individual note present in the flowgraph.
  • In this example, there are 9 notes.
  • Regions can be determined by counting the connections between notes.
  • The formula for calculating regions involves subtracting the number of notes from twice the sum of edges.

New Section

This section provides further explanation on calculating regions and their significance.

Calculating Regions

  • The calculation for regions continues from the previous section.
  • By subtracting twice the sum of edges from 11, we find that there are 4 regions.
  • The number of regions indicates complexity and logical structure within a program.

New Section

This section explores how notations and connections define closed regions within a flowgraph.

Closed Regions

  • Closed regions are formed by connecting multiple notes using "it's" and "not" statements.
  • These closed regions represent specific areas within a flowgraph.
  • Each region has its own characteristics and connections with other regions.

New Section

This section explains how to calculate complexity based on hits, nots, and additional edges

Lihat seperti ini ya nilainya sama

The speaker is discussing the similarity in values.

Similarity in Values

  • The speaker mentions that the values are the same.

You were Hai you say Kernel Iya esnya Tinggal dihitung ya Dari 12 ini tiga mag mulai dari menit atau jual Esprit 21124 lalu 56 nih twrjun 8 9 10 11 12 Umi ngomong

The speaker is explaining a calculation involving numbers from 1 to 12.

Calculation Explanation

  • The speaker explains a calculation starting from number 1 to number 12.
  • The calculation involves counting from minutes and selling Esprit.
  • Specific numbers mentioned include: "21124", "56", "8", "9", "10", "11", and "12".

1212 dikurangi berapa ya semangat hidup bunyi klakson Vespa gelap Rey berarti 4266 bikin logatnya

The speaker asks for the result of subtracting a specific number.

Subtraction Calculation

  • The speaker asks for the result of subtracting a specific number, which is not mentioned.
  • Other phrases mentioned include: "semangat hidup bunyi klakson Vespa gelap Rey" and "bikin logatnya".

Menggunakan tersendiri ini harus ini Ya intinya bisa oh ya ya ini wow kemungkinan yang pertama Ya satu langsung ke-13 play book 1 ke dua dari dua

The speaker discusses the use of a specific method or approach.

Use of a Specific Method

  • The speaker mentions using a specific method or approach.
  • Phrases mentioned include: "menggunakan tersendiri", "intinya bisa", "kemungkinan yang pertama", and "play book 1".

223 Ini menjadi 123.123 lalu dari tiga mungkin ke-62 Jaya 456456 dari part 56 ke-12 w12 ke-11 ke-13 11 ke-2 karena kenapa ini 23 langsung karena pasti setelah 2 lalu ketika tidak ada kemungkinan yang lainnya lalu ketujuh dari tujuh ke-7 bisa 2 kemungkinan yang pertama ke-88 ke-11 nah 11 ke 1212

The speaker explains a series of numbers and their relationships.

Explanation of Numbers

  • The speaker explains a series of numbers and their relationships.
  • Specific numbers mentioned include: "223", "123.123", "56", "12", "w12", "11", "13", "2", and "1212".
  • Relationships between the numbers are discussed, such as subtraction and possible outcomes.

Hai lukisan tersiksa xbraze Splash 12 dari 12 ke-11 ke-12 satu ke-23 nipu ke-7 terus dari itu juga 9910 Christmas juga 11 11 12 13 kelas 11 ke-44 berarti mungkin tadi salah ngitung dalam not maupun itsnain

The speaker mentions various numbers in relation to each other.

Mentioned Numbers

-The speaker mentions various numbers and their relationships.

-Specific numbers mentioned include: "12", "11", "23", "7", "9910", "Christmas", and "13".

-Relationships between the numbers are discussed, such as progression and possible errors in counting.

123456789 10 11 12 13 sesuai semua jalur jadi jadi sarankan minimal satu seperti itu untuk penjelasan dari jaring web testing nggak

The speaker suggests a specific approach for explaining web testing.

Suggested Approach for Web Testing Explanation

-The speaker suggests using a specific approach for explaining web testing.

-Numbers from 1 to 13 are mentioned.

-The speaker recommends using at least one specific method or approach.

Video description

Materi perkuliahan Uji Kualitas Perangkat Lunak mengenai White Box Testing