Examining the Specification Part 2: Testing Fundamentals

本文探讨了软件规格说明的重要性及审查方法,包括黑盒与白盒测试的区别、静态与动态测试的不同,以及如何从高层次审查规格说明以发现根本性问题和遗漏。文章还介绍了审查时应考虑的因素,如用户期望、现有标准、竞争产品的比较等。

Examining the Specification
Part 2: Testing Fundamentals
Chapter 4

Highlights
 What is black-box and white box testing
 How static and dynamic testing differ
 What high-level techniques can be used for
reviewing a product specification
 What specific problems you should look for
when reviewing a product specification in
detail

Getting Started
 Product specification
 Written document using words and pictures to
describe the intended product
 Calculator example
 Reason
 Programmer’s idea != User’s idea
 Thoroughly describe the product in a specification
 Document is testable

Black-box and White Box Testing
 Black-box testing
 Tester only knows what the software is
supposed to do
 Doesn’t know how
 White-box testing
 Access to program’s code and can examine
the program
 Know how
 Risk: tailor tests to match code’s operation

Static and Dynamic Testing
 Static testing
 Testing something that’s not running
 Examining and reviewing
 Dynamic testing
 Normal testing
 Running and using
 Car testing example

Static Black-Box Testing:
Testing the Specification
 Static --- document review
 Know extraction process?
 No
 Varieties of specifications
 Words
 Diagrams
 Self-documenting computer language
 What if no spec?
 Walking, talking
 Test “mental” specification

Performing a High-Level Review of the
Specification
 Process of requirements elicitation is an
inexact science and is prone to having
problems
 Research from high level
 Large fundamental problem
 Oversights
 Omissions

Pretend to Be the Customer
 Research who the customer will be
 Who will be using the software?
 Understand customer’s expectations
 Gaining some familiarity with the field
 Tip
 Don’t forget software security
 It must be specified
 User will assume that the software is safe

Research Existing Standards and
Guidelines
 Corporate Terminology and Conventions
 Industry Requirement
 Government Standards
 Graphical User Interface (GUI)
 Security Standards
 Test instead of making decision

Review and Test similar Software
 Scale
 Fewer or greater features?
 Less or more code
 Matter in your testing?
 Complexity
 More or less complex
 Will this impact your testing
 Testability
 Resources, time, and expertise to test?
 Quality/Reliability
 Representative of the overall quality planned for your software?
 More or less reliable
 Security
 Secure?
 Advertised and actual
 Compare to what you will be offering

Review and Test similar Software (2)
 Tip
 Reading online
 Collect review and articles about the
competition
 Especially helpful for security issues

Low-Level Specification Test
Techniques
 Specification Attributes Checklist
 Specification Terminology Checklist

Specification Attributes Checklist
 Complete
 Accurate
 Precise, Unambiguous, and Clear
 Consistent
 Relevant
 Feasible
 Code-free
 Testable

Specification Terminology Checklist
 List of problem words
 The appearance of these words often signifies
that a feature isn’t yet completely thought out
 It likely falls under one of the preceding
attributes

Specification Terminology Checklist (2)
 Always, Every, All, None, Never
 Certainly, Therefore, Clearly, Obviously,
Evidently
 Some, Sometimes, Often, Usually, Ordinarily,
Customarily, Most, Mostly
 Etc., And So Forth, And So On, Such As
 Good, Fast, Cheap, Efficient, Small, Stable
 Handled, Processed, Rejected, Skipped,
Eliminated
 If…Then…(but missing Else) 

<think>好的,用户遇到了blastn警告:“Examining 5 or more matches is recommended”,需要解决方案。首先,我需要回忆BLAST工具的相关知识。这个警告通常出现在用户设置的比对结果数量不足时,比如默认可能只显示一个最佳匹配,而BLAST建议至少检查5个以上以确保准确性。接下来,用户可能是在使用blastn时指定了`-num_alignments 1`这样的参数,导致只输出一个结果,从而触发警告。 接下来,我要确认这个参数的作用。根据引用[4]中的示例命令,用户确实使用了`-num_alignments 1`,这限制每个查询只显示一个比对结果。因此,解决方案应该是调整这个参数到5或更高。同时,用户可能混淆了`-num_alignments`和`-max_target_seqs`,需要解释两者的区别,因为后者可能影响结果筛选,而不仅仅是显示数量。 然后,需要检查用户的命令是否有其他相关参数,比如`-max_hsps`,如果设置为1,可能也会限制每个匹配的高分片段对(HSPs)的数量。建议用户同时调整这个参数以确保足够的HSPs被考虑。 此外,用户可能没有意识到参数设置对结果的影响,需要提醒他们正确使用这两个参数。例如,`-max_target_seqs`用于限制数据库中的目标序列数量,而`-num_alignments`控制显示的比对数量。两者都需要适当调整以避免警告,并确保结果可靠。 最后,要确保用户理解调整参数后的影响,比如输出文件会变大,但结果更准确。可能需要提供示例命令,如将`-num_alignments`改为5,并调整其他相关参数。同时,参考引用[2]和[4]中的命令示例,指出正确的参数用法,避免混淆。 总结解决方案步骤:调整`-num_alignments`和`-max_hsps`到至少5,区分`-max_target_seqs`的作用,并给出修改后的命令示例。同时,提醒用户参数的具体应用场景,如是否需要限制目标序列数量或显示更多比对结果。</think>### BLASTn警告"Examining 5 or more matches is recommended"的解决方案 该警告表明BLASTn检测到比对结果数量不足,可能影响结果可靠性。以下是具体原因和解决方法: 1. **调整核心参数** - `-num_alignments`参数控制每个查询序列显示的比对结果数量,建议设置为5或更高: ```bash blastn -num_alignments 5 # 最低推荐值 ``` - `-max_hsps`参数限制每个匹配的高分片段对(HSPs)数量,建议同步调整: ```bash blastn -max_hsps 5 ``` - *注意*:这两个参数需要配合使用,如引用[4]的案例中使用了`-num_alignments 1`会导致警告触发 2. **区分参数作用** - `-max_target_seqs`控制数据库搜索范围(默认500),而`-num_alignments`控制结果输出数量(默认250)[^2] - 错误示例: ```bash # 错误:用-max_target_seqs限制输出数量 blastn -max_target_seqs 1 # 会导致结果筛选错误[^4] ``` - 正确做法: ```bash blastn -max_target_seqs 1000 -num_alignments 5 ``` 3. **参数组合建议** ```bash blastn -db $CL_db \ -query $input_paired.fa \ -out input_blastn.out \ -outfmt 6 \ -num_alignments 5 \ -max_hsps 5 \ -evalue 1e-8 \ -word_size 9 ``` 此配置在保持高效性的同时满足可靠性要求,如引用[4]的ChIP-seq分析场景可参考该参数组合
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值