软件测试的目的、定义和重要性

需积分: 17 0 下载量 26 浏览量 更新于2024-07-12 收藏 2.03MB PPT 举报
软件测试基础知识 软件测试是软件工程中一个非常重要的步骤,它的主要目的是为了验证和确认软件是否满足需求。软件测试可以分为两个方面:验证和确认。验证是指保证软件正确地实现了一些特定功能的一系列活动,而确认则是指一系列的活动和过程,目的是想证实在一个给定的外部环境中软件的逻辑正确性。 软件测试的目的和重要性不能被夸大。开发工作的前期不可避免地会引入错误,测试的目的是为了发现和改正错误,这对于某些涉及人的生命安全或重要的军事、经济目标的项目显得尤其重要。历史上有很多关于软件测试的重要性的案例,例如1963年美国飞往火星的火箭爆炸和1967年苏联“联盟一号”宇宙飞船返回时的悲剧,都是由于软件测试的缺失或不充分导致的。 软件测试的基本概念包括验证和确认两个方面。验证是指保证软件正确地实现了一些特定功能的一系列活动,而确认则是指一系列的活动和过程,目的是想证实在一个给定的外部环境中软件的逻辑正确性。软件测试的基本概念还包括测试的目的、重要性、特点等方面。 软件测试的特点包括软件测试的开销大、软件测试的复杂性高、软件测试需要专门的知识和技能等。按照Boehm的统计,软件测试的开销大约占总成本的30%-50%。例如,APPOLLO登月计划,软件测试的开销就占了整个项目的30%-50%。 软件测试的步骤包括有效性测试和软件配置复查两个方面。有效性测试是指制定测试计划,运用黑盒法,验证软件特性是否与需求符合。软件配置复查是指软件配置项(SCI)是否齐全的检查。 软件测试的方法包括黑盒测试、白盒测试、灰盒测试等。黑盒测试是指不考虑软件内部的结构和实现细节,只关心软件的输入和输出。白盒测试是指考虑软件内部的结构和实现细节,关心软件的逻辑和算法。灰盒测试是指介于黑盒测试和白盒测试之间,既关心软件的输入和输出,也关心软件的逻辑和算法。 软件测试是软件工程中一个非常重要的步骤,它的主要目的是为了验证和确认软件是否满足需求。软件测试的基本概念、特点、步骤和方法都是软件测试中非常重要的方面。
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 上传