Mar 3 | 3:55 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
notdrone | has entered the room |
Mar 3 | 4:00 PM |
Mark M. |
hello, notdrone!
|
Mark M. |
how can I help you today>
|
Mark M. |
er, today?
|
notdrone |
hi! first time here. thanks a lot for holding the office hours.
|
Mark M. |
sure!
|
notdrone |
I'm working on an app with a login screen
|
Mark M. |
mostly, people only show up if they have specific questions to ask
|
Mark M. |
OK
|
notdrone |
i want to unit test the screen
|
notdrone |
what all should i be testing?
|
notdrone |
i have tests for email validation & password validation?
|
notdrone |
should I be making calls to the server or simply mock the service layer?
|
Mark M. |
um, I can't really tell you what you should be testing
|
Mark M. |
in terms of the server, do you have a test server, or is it just the production server?
|
notdrone |
both
|
Mark M. |
I usually test against a test server
|
Mark M. |
versus mocks
|
notdrone |
test server on localhost?
|
Mark M. |
possibly, or on something else
|
Mark M. |
I have a Raspberry Pi that I use for some stuff
|
notdrone |
got it! so no need to test against the mock?
|
Mark M. |
if you can cover all your tests without mocks, then you do not need mocks
|
Mar 3 | 4:05 PM |
Mark M. |
so, it really depends on what you are testing and what the test server has in terms of data
|
Mar 3 | 4:05 PM |
Mark M. |
if there are scenarios that you need to test, that the test server cannot handle, then you might need a mock for that
|
notdrone |
understood. Will try it out and report back in the next office hour.
|
notdrone |
thanks a lot!
|
Mark M. |
you're welcome!
|
notdrone | has left the room |
Mar 3 | 4:15 PM |
Mike | has entered the room |
Mike |
Hey Mark
|
Mike |
Hi
|
Mark M. |
hello, Mike!
|
Mark M. |
how can I help you today?
|
Mike |
quick question, I'm using GcmTaskService with OneoffTask. Is it possible to have two executing tasks in same time?
|
Mark M. |
I have never used GcmTaskService, sorry
|
Mike |
is there anything wrong with it?
|
Mike |
something I should be aware of?
|
Mark M. |
I try to avoid dependencies on Play Services where I can
|
Mike |
I am using it to start processing some operations previously saved in db.
|
Mar 3 | 4:20 PM |
Mike |
i am sending the operations to backend
|
Mike |
calling API
|
Mark M. |
and if you are already invested in Play Services, and you want to use GcmNetworkManager, you're certainly welcome to do so
|
Mark M. |
I just haven't used it, so I have near-zero knowledge about it
|
Mike |
for this scenario, what would be your other option instead of GcmTaskService?
|
Mark M. |
JobScheduler, AlarmManager, or an API wrapping those up (e.g., Evernote's android-job library)
|
Mike |
I see
|
Mark M. |
android-job also happens to wrap GcmNetworkManager, IIRC, if you happen to have it in your project and are running on a Play ecosystem device
|
Mike |
OK, thank you.
|
Mark M. |
sorry that I didn't have anything for you on that
|
Mar 3 | 4:25 PM |
Mike |
not a problem, thank you
|
Mike |
arghh, not a chance for office hours next week?
|
Mark M. |
sorry, but I'm on travel
|
Mike |
I see, have a nice travel then.
|
Mark M. |
I'll try to add one in the 7:30pm US Eastern slot, perhaps for Thursday
|
Mike |
cool, thank you
|
Mar 3 | 4:55 PM |
Mark M. |
any last questions?
|
Mar 3 | 5:00 PM |
Mark M. |
OK, that's a wrap for today's chat
|
Mark M. |
the next one will be Thursday at 7:30pm US Eastern
|
Mark M. |
have a pleasant day!
|
Mike | has left the room |
Mark M. | turned off guest access |