软件测试实战(二)冒烟测试

前端代码

<!DOCTYPE html>  
<html>
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
<body>
 <form id="form-cal" method="get" action="http://localhost:8080/cal">   
计算输入:<br>   
<input type="text" name="cal" value="" id="cal">   
<span class="btn btn-default btn-sm" id="btn-jq-form">计算</span>
</form>
 <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
 <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdn.bootcss.com/jquery.form/4.2.2/jquery.form.min.js"></script>
<script>   
// jquery.form 方式    $('#btn-jq-form').click(function ()
{        $('#form-cal').ajaxSubmit({            dataType: 'text',            success: function (resp) {                console.info('返回的数据', resp);                $('#resp').html(resp);            }        });    });
</script>
 <p id="resp">结果</p>
 </body></html>

服务端代码

import web  
urls = (  '/', 'index',  '/cal','cal',)
class index:
     def GET(self):
         return web.seeother('/static/sample.html')
 class cal:
     def GET(self):
         cal = web.input()['cal']
         return "%s = %s" % (cal,eval(cal))
 if __name__ == "__main__":
     app = web.application(urls, globals())
     app.run()

问题罗列

打开浏览器编码乱码 可用性


建议html默认设置utf8

单次计算无限制 产品定义不清晰


建议只能计算一次

输入无限制服务端出错 - 非功能测试

建议服务端处理

数学逻辑问题没有处理 - 功能测试


服务端容错处理

简单测试报告

测试不通过,不能进行前后端分离测试。

产品需求不清楚,单词计算次数无限制,小数点是否保留无限制,计算位数为限制

通过阅读代码,服务端没有对输入做检查,存在稳定性健壮性问题,以及数学逻辑问题 

服务单不能出现500错误

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容