Skip to content

1.6 Testing and Debugging 测试与调试

Developers create and innovate using an iterative design process that is user-focused, that incorporates implementation/feedback cycles, and that leaves ample room for experimentation and risk-taking.

  • 开发者使用以用户为中心的迭代设计过程进行创造和创新,该过程包含实施/反馈循环,并为实验和风险承担留有充足空间。

核心要点 Core Points

  1. In the development process, testing uses defined inputs to ensure that an algorithm or program is producing the expected outcomes. Programmers use the results from testing to revise their algorithms or programs.

    • 在开发过程中,测试使用定义的输入来确保算法或程序产生预期的结果。程序员使用测试结果来修订他们的算法或程序。
  2. Defined inputs used to test a program should demonstrate the different expected outcomes that are at or just beyond the extremes (minimum and maximum) of input data.

    • 用于测试程序的定义输入应演示在输入数据的极值(最小值和最大值)处或刚好超出极值的不同预期结果。
  3. Program requirements are needed to identify appropriate defined inputs for testing.

    • 需要程序需求来识别适当的测试定义输入。

学生活动 Student Activities

  1. Identify inputs and corresponding expected outputs or behaviors that can be used to check the correctness of an algorithm or program.
    • 识别可用于检查算法或程序正确性的输入和相应的预期输出或行为。

基于 VitePress 构建的 AP CSP 学习平台