软件测试:渐增式组装与错误发现

需积分: 17 0 下载量 155 浏览量 更新于2024-08-23 收藏 2.03MB PPT 举报
"渐增式组装测试是软件测试中的一种策略,它强调在模块测试后逐步将模块组合成更大的系统,并在每个组装阶段进行测试。这种测试方法有两种主要方案:设计驱动模块或桩模块来测试每个新组装的子系统,以及自顶而下和自底而上的增值测试。 自顶向下增值测试是从系统的最高层次开始,逐步添加较低层次的模块,每次添加后都进行测试,确保整个系统功能的正确性。这种方法有助于尽早发现接口问题,但可能需要更多的桩模块来模拟未测试的底层模块。 相反,自底向上增值测试是从最基础的模块开始,逐渐集成到更复杂的系统层次,每个新加入的模块都会与已测试的模块一起进行测试。这种方法可以较早地验证核心功能,但可能延迟了对系统整体行为的验证。 软件测试的定义不仅仅局限于查找错误,而是一个更为全面的过程。Grenford J. Myers的观点强调测试是为了揭示潜在的错误,但同时也强调了测试对于改进开发流程、提高测试效率和评估软件质量的重要性。即使在没有发现错误的情况下,测试也具有价值,因为它可以验证软件是否符合既定的需求和规范。 验证和确认是软件测试的两个关键概念。验证确保软件功能符合预期,而确认则验证软件在特定环境中的逻辑正确性。软件测试在确保软件质量、预防严重错误(如历史上的飞行事故所示)以及控制高昂的测试成本方面起着至关重要的作用。根据Boehm的数据,软件测试可能占项目总成本的30%-50%,因此优化测试策略至关重要。"
2016-10-21 上传

#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<windows.h> #include<string.h> #include<stdlib.h> #include<math.h> #include<malloc.h> typedef struct character_name { char name[100]; struct character_name* next; }char_name; typedef struct character_title { char title[100]; struct character_title* next; }char_title; typedef struct character_identity { char identity[100]; struct character_identity* next; }char_iden; typedef struct character_attribute { int strength; struct character_attribute* next; }char_att; typedef struct character_information { char_name* _name; char_title* _title; char_iden* _iden; char_att* _att; struct character_information* next; }char_inf; char_inf* initialization() { char_inf* node = (char_inf*)malloc(sizeof(char_inf)); node->_name = (char_name*)malloc(sizeof(char_name)); node->_title = (char_title*)malloc(sizeof(char_title)); node->_iden = (char_iden*)malloc(sizeof(char_iden)); node->_att = (char_att*)malloc(sizeof(char_att)); return node; } char_inf* ceshi, * current, * end; char_name* name_current, * name_end; char_title* title_current, * title_end; char_iden* iden_current, * iden_end; char_att* att_current, att_end; int main() { ceshi = initialization(); name_current = (char_name*)malloc(sizeof(char_name)); name_current = ceshi->_name; strcpy(name_current->name, "ceshi_1_1"); name_current->next = (char_name*)malloc(sizeof(char_name)); name_current = name_current->next; strcpy(name_current->name, "ceshi_1_2"); strcpy(ceshi->_title->title, "ceshi_2"); strcpy(ceshi->_iden->identity, "ceshi_3"); ceshi->_att->strength = 4; name_current = ceshi->_name; while (name_current->next != NULL) { printf("%s\n", name_current->name); name_current = name_current->next; } printf("%s\n%s\n%d\n", ceshi->_title->title, ceshi->_iden->identity, ceshi->_att->strength); return 0; } 为什么提示我访问权限报错

2023-07-14 上传
2023-07-14 上传