该文利用软件组件间信息流的传递过程,提出了基于风险分析的回归测试用例优先级排序算法(Risk Analysis-based Test Case Prioritization,RA-TCP).该算法针对现有的优先级排序技术未能有效利用测试用例所覆盖信息的问题,在类粒度下将软件抽象为基于信息流的类级有向网络模型,然后将每个测试用例所覆盖的类间信息传递关系用一组杠铃模型表示,结合概率风险评估方法和故障树理论计算杠铃模型的风险值,最后以测试用例所覆盖的杠铃风险总和作为其排序依据.实验结果表明,风险越高的测试用例覆盖错误的可能性越大,RA-TCP算法提高了具有严重风险的错误发现速率,与7种排序算法对比,RA-TCP算法具有较高的错误检出率及较好的稳定性.
In this paper, the invulnerability and cascade failures are discussed for the urban bus network. Firstly, three static models(bus stop network, bus transfer network, and bus line network) are used to analyse the structure and invulnerability of urban bus network in order to understand the features of bus network comprehensively. Secondly, a new way is proposed to study the invulnerability of urban bus network by modelling two layered networks, i.e., the bus stop-line network and the bus line-transfer network and then the interactions between different models are analysed. Finally, by modelling a new layered network which can reflect the dynamic passenger flows, the cascade failures are discussed. Then a new load redistribution method is proposed to study the robustness of dynamic traffic. In this paper, the bus network of Shenyang City which is one of the biggest cities in China, is taken as a simulation example. In addition, some suggestions are given to improve the urban bus network and provide emergency strategies when traffic congestion occurs according to the numerical simulation results.