baidu / baidu/Cafe

Cafe测试方法传递参数

Open
#4 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
367
Forks
209
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.