Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Functional test with AndroidTestRule #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MehdiChouag wants to merge 4 commits into android10:master from MehdiChouag:master

Conversation

Copy link

@MehdiChouag MehdiChouag commented Nov 26, 2015

Replace activities testing by AndroidJUnit4 and AndroidTestRule

androidTestCompile presentationTestDependencies.espresso
androidTestCompile presentationTestDependencies.testingSupportLib
androidTestCompile (presentationTestDependencies.espresso) {
exclude group: 'com.android.support', module: 'support-annotations'
Copy link
Owner

@android10 android10 Dec 1, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to exclude annotations here? Is this a transitive dependency?

Copy link
Author

@MehdiChouag MehdiChouag Dec 1, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a conflict with dependencies, because of different versions of android support annotation. If I remove this line a I get this error :

Warning:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (21.0.3) and test app (23.0.1) differ.

Copy link

@MehdiChouag you must also re-write mapper tests as currently they are using the old AndroidTestCase and with junit4 and AndroidJUnitRunner they won't work. In general seems OK 👍

Copy link
Owner

Closing due to inactivity. I'm planing to refactor the whole test suite.
@spirosoik thanks for reviewing it. 👏

@MehdiChouag I really appreciate your efforts and contribution, I'm gonna reuse part of your code such as AndroidTestRule. 👏 😄

Copy link

@android10 yes must be completely different. We must split down the unit tests and the instrumentation tests in presentation layer according to junit4 and AndroidJUnitRunner .

Copy link
Owner

@spirosoik right. My next step is to refactor the project, so only one module exist. I need to re organize projects as well :). As usual, any ideas are welcome.

Copy link

@android10 do you mean one module for every layer?

Copy link
Owner

@spirosoik it is not necessary to have 3 different modules for each layer as the current project has.
It is a work in progress and before merging I will create a discussion in order to get feedback.
Here it is: #103

Copy link

@android10 why did you decide this, just I am wondering your thoughts :) ? My opinion, it's great the multiple module approach as it's easier the code navigation and minimises the scope in different independent modules.

Copy link
Owner

@spirosoik of course there is no final decision here, that is why I opened a PR, 😃 and I want most people to agree before moving parts on master 🔥

From my perspective, having everything in a single module favors classes scopes and package organization (the current approach obligate us to have many public classes that should not be public).

Also I don't see this organization into modules scaling so well since there is no package organization by feature, that is why I would like to get input on this.

Copy link

@android10 the only problem with current implementation as you said is the API by the software's design perspective. If we go through Effective java for sure some rules are not applied here but I think these can be used in this case also. During our implementation we changed the visibility for a few things and we used eg. package-level especially in data module. We also have a core module with some stuff like Presenter, UIThread etc.

BTW based on your approach we are packaging by feature and it scales nicely until now and we have a lot of code.

But it's a good time to discuss your new approach :)

Copy link
Owner

@spirosoik glad to hear that. Let's keep it up in another discussion. Once I'm done with the PR, I will open one to get input and see whether or not it worth a try 😃
Thanks again buddy!

Copy link

👍 I am fan of your great work. @android10 BTW are you open for a presentation here in Greece?

Copy link
Owner

@spirosoik Thank you! About a presentation, of course! Would love to and meet you guys in person! 😃

Copy link

@android10 Great I will inform you soon for the details 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /