# ODK Testing Workshop 2017-11-08

**URL:** <https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205>\
**Category:** Development\
**Created:** [October 12, 2017, 5:43pm UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205 "2017-10-12T17:43:26Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![jknightco](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jknightco/32/2726_2.png) [@jknightco](https://forum.getodk.org/u/jknightco)\
**Post date:** [October 12, 2017, 5:43pm UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/1 "2017-10-12T17:43:26Z")

</div>

**How to access:**  
The workshop will be broadcast live [here on YouTube Live](https://www.youtube.com/watch?v=6iZaRF3njH4).

**What is it?**  
A free testing workshop that covers the basics of writing tests for Android and submitting them to an Open Source project such as ODK Collect. We’ll cover how to test Activities, Views, and other classes, as well as what can be done when writing new code to make testing easier.

**What all will be covered?**

- What should we test?
- How can we design our app to be more testable?
- JUnit tests for non-Android classes.
- Robolectric tests for Views, Fragments, and other discrete Android components.
- Instrumentation tests for general app behavior.
- How to submit a PR to add our new tests to the project.

**When is it?**  
Wednesday, November 8th  
UTC 16:00 - 18:00 (PST 8AM, EST 11AM, CET 17:00, IST 21:30)

**FAQ**  
_Will it be recorded?_  
Yep! We’ll record it on YouTube Live for all of the people who aren’t able to make it.

_How long will it last?_  
Around 2 hours, although the last 30-45 minutes will be Q&A.

_Will we cover Dagger, Rx, etc.?_  
Nope! This session will mainly be focused on the basics, specifically looking at how to add tests to existing code bases such as ODK Collect (although the same stuff applies to new projects as well). We’ll mention some of these libraries as tools to help make apps easier to test, but they won’t be covered during the session.

---

<div class="post-metadata">

**Author:** ![jknightco](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jknightco/32/2726_2.png) [@jknightco](https://forum.getodk.org/u/jknightco)\
**Post date:** [October 12, 2017, 5:44pm UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/2 "2017-10-12T17:44:36Z")

</div>

If anyone has any specific topics they'd like to see covered feel free to mention them here!

---

<div class="post-metadata">

**Author:** ![LN](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ln/32/1605_2.png) [@LN](https://forum.getodk.org/u/LN)\
**Post date:** [October 17, 2017, 6:53pm UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/3 "2017-10-17T18:53:26Z")

</div>

I'm excited! I look forward to a decision on time so I can block it off on my calendar. @jknightco how are you thinking you'll decide that?

A great output would be a series of small, well-scoped Collect issues around testing that link to the video so it's easy for people new to Android testing to get started.

@Jason_Rogena we talked about this months ago and it's happening! Any topics you want to make sure are discussed?

Some people who come to mind as potentially interested in suggesting topics and/or participating (and who haven't liked the post already!) - @Akshay_Patel @alxndrsn @daveycrockett @Divya_Rani @ggalmazor @Grzesiek2010 @michal_dudzinski @mish24 @Ngumbau @srv-twry @Yura-L

---

<div class="post-metadata">

**Author:** ![ggalmazor](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ggalmazor/32/2702_2.png) [@ggalmazor](https://forum.getodk.org/u/ggalmazor)\
**Post date:** [October 17, 2017, 7:53pm UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/4 "2017-10-17T19:53:09Z")

</div>

Hi!

This is going to be a great starting point to work with Android projects for me. I'm looking forward to this session 🙂

My two cents:

- I'd love to understand how much of an app can be tested in isolation and what implementation strategies can we follow to maximize this. How far does it make sense to go?
- I think it will be very helpful to keep everything close to the actual codebase of Collect or any other real Android project. Real projects bring real problems and provide great opportunities to discuss trade offs.

I also wanted to contribute on the topic of testing with this video of Ian Cooper that I find to be most inspiring: [https://vimeo.com/68375232](https://vimeo.com/68375232)

---

<div class="post-metadata">

**Author:** ![Divya\_Rani](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/divya_rani/32/2407_2.png) [@Divya\_Rani](https://forum.getodk.org/u/Divya_Rani)\
**Post date:** [October 18, 2017, 1:46am UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/5 "2017-10-18T01:46:41Z")

</div>

Hi!  
I'm very excited to participate in this workshop! I think a topic on how to build local unit tests using mocking frameworks would be nice.🙂  
Thanks for the mention @LN !

---

<div class="post-metadata">

**Author:** ![jknightco](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jknightco/32/2726_2.png) [@jknightco](https://forum.getodk.org/u/jknightco)\
**Post date:** [October 24, 2017, 9:04am UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/6 "2017-10-24T09:04:09Z")

</div>

Here are the two timeslots I think work for a majority of people involved. Don't stress if you're not available during either of these slots—we'll be recording the entire session live so you can watch it when you're able.

_Poll ([view on site](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/6))_

---

<div class="post-metadata">

**Author:** ![jknightco](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jknightco/32/2726_2.png) [@jknightco](https://forum.getodk.org/u/jknightco)\
**Post date:** [October 25, 2017, 4:02pm UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/7 "2017-10-25T16:02:16Z")

</div>

Let's go with the earlier slot then—its not too early for west coasters in the US nor too late for those of us in Asia.

---

<div class="post-metadata">

**Author:** ![jknightco](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jknightco/32/2726_2.png) [@jknightco](https://forum.getodk.org/u/jknightco)\
**Post date:** [October 25, 2017, 4:15pm UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/8 "2017-10-25T16:15:07Z")

</div>

We'll definitely cover mocks, as well as how to restructure code to make things more "unit" testable. Thanks!

---

<div class="post-metadata">

**Author:** ![jknightco](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jknightco/32/2726_2.png) [@jknightco](https://forum.getodk.org/u/jknightco)\
**Post date:** [October 25, 2017, 4:16pm UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/9 "2017-10-25T16:16:42Z")

</div>

These are definitely both topics we'll be covering. The first section of the workshop will talk specifically about how we can restructure existing projects to be more testable. We'll also be using existing Collect code for each example!

---

<div class="post-metadata">

**Author:** ![jknightco](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jknightco/32/2726_2.png) [@jknightco](https://forum.getodk.org/u/jknightco)\
**Post date:** [November 7, 2017, 10:35am UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/10 "2017-11-07T10:35:15Z")

</div>

A big reminder to everyone interested in the workshop that its being held **tomorrow, November 8th at 16:00 UTC**. You can find the time in your local timezone here: [http://www.thetimezoneconverter.com/?t=16&tz=UTC%20(Coordinated%20Universal%20Time)](http://www.thetimezoneconverter.com/?t=16&tz=UTC%20(Coordinated%20Universal%20Time))

The workshop will be hosted on YouTube Live and I will add a link here later today.

Looking forward to everyone coming!

---

<div class="post-metadata">

**Author:** ![yanokwa](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/yanokwa/32/1695_2.png) [@yanokwa](https://forum.getodk.org/u/yanokwa)\
**Post date:** [November 8, 2017, 10:46pm UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/11 "2017-11-08T22:46:29Z")

</div>

You can find the video from the testing workshop below!

[![](https://getodk.b-cdn.net/uploads/default/original/3X/2/3/232d40ee110f4c287f2bc6bcd449c20e1a603f11.jpeg "ODK Testing Workshop: Android Testing 101") ](https://www.youtube.com/watch?v=6iZaRF3njH4)

---

<div class="post-metadata">

**Author:** ![iamnarendrasingh](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/iamnarendrasingh/32/2593_2.png) [@iamnarendrasingh](https://forum.getodk.org/u/iamnarendrasingh)\
**Post date:** [November 9, 2017, 4:48am UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/12 "2017-11-09T04:48:37Z")

</div>

Apologies I was not able to watch this life now I will watch and ask if I have any question. Great work @yanokwa @jknightco.

Narendra

---

<div class="post-metadata">

**Author:** ![jknightco](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/jknightco/32/2726_2.png) [@jknightco](https://forum.getodk.org/u/jknightco)\
**Post date:** [November 9, 2017, 4:55pm UTC](https://forum.getodk.org/t/odk-testing-workshop-2017-11-08/10205/13 "2017-11-09T16:55:50Z")

</div>

Thanks to everyone who was able to come! For those of you who missed it, Yaw posted the video above. Feel free to find me here, on the ODK Slack, or at [james@saneandroid.com](mailto:james@saneandroid.com) if you have any questions!
