Allow some test setup code to be run before starting the Activity #193

Open
donv opened this Issue Jun 25, 2012 · 3 comments

2 participants

@donv
Ruboto member

No description provided.

@meredrica

i think that would be against the android activity lifecycle and generally not possible. hook your checks into on_create

@donv
Ruboto member

The Android test life cycle allows running code before instantiating the Activity under test. It would be useful if you wanted to parameterize the Activity and test different variation.

It is definitely possible.

How would it look in the test?

activity org.ruboto.test_app.MyActivity

before_activity do
  Do stuff here before the activity is started
end

setup do |activity|
  Stuff after the activity is started
end

test('some behaviour') do |activity|
  assert true
end
@meredrica

doh, sorry. i did not get the "test" part

@donv donv modified the milestone: 1.1.1, 1.1 May 18, 2014
@donv donv modified the milestone: 1.1.2, 1.1.1 Jul 1, 2014
@donv donv modified the milestone: 1.1.3, 1.1.2 Jul 9, 2014
@donv donv modified the milestone: 1.2, 1.1.3 Oct 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment