用意式浓缩咖啡测试订单

用意式浓缩咖啡测试订单

本文介绍了用意式浓缩咖啡测试订单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在android中设置测试运行顺序?
我使用Espresso框架,需要测试许多活动和它们之间的过渡.我想为这些活动编写不同的测试,但是我需要一个特定的顺序来运行这些测试.

Is there a way to set test running order in android?
I use Espresso framework and need to test a lot of activities and transitions between them. I want to write different test for those activities, but I need a specific order for running those tests.

推荐答案

如上面@spinster所述,您应该以顺序无关紧要的方式编写测试.

As @spinster said above, you should write your tests in a way where order doesn't matter.

我相信Junit 3将以完全合格的类名的字母顺序运行测试,因此从理论上讲,您可以通过按您希望它们执行的顺序按字母顺序命名它们(包名,类名,方法名)来控制顺序,但我不建议这样做.

I believe Junit 3 will run tests in alphabetical order of the fully qualified class name, so in theory you could control the order by naming them ( package name, class name, method name ) alphabetically in the order you would like them executed, but I would not recommend that.

请参阅:如何在JUnit4中按特定顺序运行测试方法?/a>如何预定义junit的运行顺序测试用例?

See:How to run test methods in specific order in JUnit4?How to pre-define the running sequences of junit test cases?

这篇关于用意式浓缩咖啡测试订单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 12:15