Cafe测试方法传递参数

Open
#4 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, java
Domain
mobile, testing

Research direction

No files or tests are named in the issue. Start by locating how Cafe invokes test methods and how its current configuration is read, then compare those entry points with the requested runtime parameters for device selection, loop counts, and credentials. Done means an agreed parameter mechanism and coverage for the described use cases.

Written by the indexing model from the issue text.

Description

Cafe是否有给测试方法传递参数的机制?如果没有强烈建议加上去。比如有以下场景,要做手机适配测试,实现我针对多种手机写好了拍照的类,运行时要通过传递的参数去new出不同类,调用拍照方法,或者我测试方法里有个循环,传递参数控制循环次数,再比如一个app不允许多点登陆,大量跑case时,用户密码不能写死在case中,只能通过外部传入。据我所知robotium不支持外部传递参数,只能通过读取配置文件的方式,这用起来很不方便。

Dominant language
Java
Stars
367
Forks
210
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from baidu/Cafe

All issues in baidu/Cafe

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.