gpt4 book ai didi

java - 使用相同的集成测试测试多个 Android 应用程序?

转载 作者:行者123 更新时间:2023-12-01 04:32:34 24 4
gpt4 key购买 nike

我认为这个可能性不大,但是......

我们有这样的项目结构:

common-library
- denmark
- application
- france
- application
- application-xxxxxx
- application
- integration-tests

每个应用程序都有不同的配置、翻译、不同的包名称等等,但总的来说它们几乎是相同的。它们具有相同的功能、相同的用户界面等。

我们现在只有一个应用程序通过 Robotium 进行了集成测试。有没有办法为其他应用程序“共享”相同的集成测试?

如果能为每个应用程序提供“通用测试”和自定义/特定测试,那就太完美了。这有可能吗?

我们使用 Maven 和 Jenkins 来满足我们的需求。

欢迎任何其他方法或建议。

最佳答案

好吧,假设您只需要维护一组集成测试,我会朝着以下方向发展:

  • 单独的 Maven 模块仅保存集成测试
  • 在其中我将引入多个 Maven 配置文件,其中每个配置文件都会指定仅对要测试的模块之一的 Maven 依赖
  • 构建稍后可以在配置文件之间切换以仅激活特定构建

正如一些关于集成测试选项的注释所说( http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing ),我相信它也会影响这种方法:

The disadvantage of doing it this way is that it tends to separate the integration tests from the code they're attempting to test. As a result, you may find that no one "owns" the integration tests; typically you'll have some one person whose job it is to analyze the integration tests and find bugs. QA is hard, but it's even harder when it's unclear who "owns" test failures.

另一个问题可能是,如果您在代码更改时自动运行包括集成测试(通过 Jenkins)的构建。模块依赖项不会自动启动您的集成测试。相反,您可能需要为每个配置文件定义一个 Jenkins 作业,并手动定义正确的作业顺序。例如:如果 Jenkins 构建了丹麦应用程序 => 构建集成,并配置了丹麦配置文件,...

关于java - 使用相同的集成测试测试多个 Android 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17826456/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com