Skip to content
This repository has been archived by the owner on May 8, 2019. It is now read-only.

UI test with Espresso #1249

Closed
javipacheco opened this issue Feb 2, 2017 · 6 comments
Closed

UI test with Espresso #1249

javipacheco opened this issue Feb 2, 2017 · 6 comments
Assignees
Labels
client Project_Cancelled The project died before this issue or pull request was completed spyke

Comments

@javipacheco
Copy link
Collaborator

We should found the best way to create tests for UI using Espresso. This issue is for investigating about how we can generate the tests

@javipacheco javipacheco self-assigned this Feb 2, 2017
@pedrovgs
Copy link
Collaborator

Great idea! But before to start with this task, I'd evaluate if using a different approach like screenshot testing is going to be better for this project. As this is an open source project where the UI changes are really important using an approach based on screenshot could really improve the quality of your external and internal contributions. You can compare how the same project tested with screenshot testing or espresso reduces the number of tests needed and also creates an awesome history for your UI changes. In addition, any change in the code changing the color or the position of just one pixel will break the build until a UI designer or any member of the team validates the change. I'm sure this is something @jorgegalindocruces is going to love! 😄

The main issue you are going to find is that this framework is based on two Gradle tasks I'm not sure you can invoke from sbt.

I'd really like to collaborate, if I can help, just let me know!

@raulraja
Copy link
Contributor

raulraja commented Mar 2, 2017

@pedrovgs We should be able to invoke gradle from within sbt as a process. Also if the gradle tasks are just calling other Java APIs we can just rewrite those in sbt. If you think putting a small POC of screenshot testing is not a lot of work we'd love this contribution.

@pedrovgs
Copy link
Collaborator

pedrovgs commented Mar 2, 2017

It's not so hard and I'd really like to contribute with regular UI tests or screenshot tests. The problem is that to be effective I need to replace part of the production code using a test double or using this technique could be really difficult.

@pedrovgs
Copy link
Collaborator

pedrovgs commented Mar 2, 2017

Remember that I can't get an instance of an Activity without initializing the Activity lifecycle so depending on the project architecture we will be able to easily simulate different scenarios or not.

Here you can take a look at this repository if needed. Here you can see how using mockito and a dependency injector we can configure the number of super heroes the Activity shows.

@raulraja
Copy link
Contributor

raulraja commented Mar 2, 2017 via email

@pedrovgs
Copy link
Collaborator

pedrovgs commented Mar 2, 2017

Ok!

soundslikeaplan

@diesalbla diesalbla added the Project_Cancelled The project died before this issue or pull request was completed label Apr 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client Project_Cancelled The project died before this issue or pull request was completed spyke
Projects
None yet
Development

No branches or pull requests

4 participants