Updated Documentation

55 views
Skip to first unread message

Chani Shulman

unread,
Sep 3, 2022, 5:50:46 PM9/3/22
to Robolectric
I am looking for updated documentation, are there any plans to provide them?
Thanks

utzcoz

unread,
Sep 4, 2022, 12:48:50 AM9/4/22
to robol...@googlegroups.com
Hi Chani,

We often update important documentation to http://robolectric.org/. You can first check it. And there are many related tests for Robolectric's new features, and you can check https://github.com/robolectric/robolectric source code if needed.

BR,
utzcoz.

On Sun, Sep 4, 2022 at 5:50 AM Chani Shulman <ch...@riverside.fm> wrote:
I am looking for updated documentation, are there any plans to provide them?
Thanks

--
You received this message because you are subscribed to the Google Groups "Robolectric" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robolectric...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robolectric/2c26636c-7b94-467b-98f2-9dce415cb5ccn%40googlegroups.com.

Chani Shulman

unread,
Sep 4, 2022, 7:40:35 AM9/4/22
to Robolectric
RobolectricTestRunner isnt resolving is there anything missing in the documentation?

elfue...@gmail.com

unread,
Sep 4, 2022, 7:44:30 AM9/4/22
to Robolectric
You probably should add the following line to the deps:

testImplementation 'org.robolectric:robolectric:4.8.2'

and add your test classes to 'test', and not to 'androidTest` module.
воскресенье, 4 сентября 2022 г. в 13:40:35 UTC+2, ch...@riverside.fm:

Chani Shulman

unread,
Sep 4, 2022, 8:49:04 AM9/4/22
to Robolectric
I did exactly this.

Chani Shulman

unread,
Sep 4, 2022, 8:54:57 AM9/4/22
to Robolectric
Why is there no up to date clear documentation? It would be extremely helpful.

elfue...@gmail.com

unread,
Sep 4, 2022, 9:48:15 AM9/4/22
to Robolectric
I believe, because no one wants to pay for documentation. do you?

воскресенье, 4 сентября 2022 г. в 14:54:57 UTC+2, ch...@riverside.fm:

Chani Shulman

unread,
Sep 4, 2022, 10:03:41 AM9/4/22
to Robolectric
I can offer to do it' if it was clear to me :)

utzcoz

unread,
Sep 4, 2022, 10:44:29 AM9/4/22
to robol...@googlegroups.com
I have written an article to introduce Robolectric : https://utzcoz.github.io/2022/02/27/Android-Testing-with-Robolectric.html, and it has a step to integrate Robolectric to app, you can check it out.

If you have any questions about integrating Robolectric, you can file a new issue at https://github.com/robolectric/robolectric with a minimal reproduction app. We can check what you missed.

Also if you think documentation is not great, and you need more information, you can try to file a new issue at https://github.com/robolectric/robolectric.github.io. We can discuss together to improve it.

BR.

mauricio rodriguez

unread,
Sep 4, 2022, 1:57:52 PM9/4/22
to robol...@googlegroups.com
Hi, I also have some doubts that I didn't manage to find answers on the documentation, maybe it is a good chance to bring it up.

I write tests for an educational platform and the tests that I write should ideally accept any valid answer from users and time related projects have been a real pain.

One of the doubts is about shadowing java.util classes, to be more specific java.util.Timer. From what I understand java.lang is completely out of reach because it loads before robolectric itself, does java.util suffer from the same problem?

A second doubt is about the paused mode on the looper. From what I could experiment there are some instructions that can advance the clock by one millisecond even if no calls to .idle() or .idleFor() are made, is that right? I would like to know more in depth knowledge about how the paused looper mode works and its limitations.  The workaround that I had to do in one of the projects I write tests for was measuring time in tests just to capture these possible involuntary advances of the clock so that I can account for that when doing assertions.

A third doubt is about the consequences of instrumenting the code to be tested. Here the idea behind is to give support for users implementation that use calls to System.currentTimeMillis. I know that System.currentTimeMillis is not shadowed directly because it is from the java.lang package, but that instrumented code that calls that is redirected to a different method, but I also been advised that instrumenting the code to be tested could be problematic without any hints on why that could be problematic.

Sabeur Dakhli

unread,
Sep 4, 2022, 5:44:14 PM9/4/22
to robol...@googlegroups.com
Suivi

2022-09-04 19:57 UTC+02:00, mauricio rodriguez <blackca...@gmail.com>:
>>>>>>>>>> <https://groups.google.com/d/msgid/robolectric/2c26636c-7b94-467b-98f2-9dce415cb5ccn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>>> .
>>>>>>>>>>
>>>>>>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups
>>> "Robolectric" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an
>>> email to robolectric...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/robolectric/e6620cc2-6c7f-45f9-83a4-1760c6e2e54an%40googlegroups.com
>>> <https://groups.google.com/d/msgid/robolectric/e6620cc2-6c7f-45f9-83a4-1760c6e2e54an%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Robolectric" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to robolectric...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/robolectric/CABu6A6aAF0gMDDCPU04hA_8HuRc_OOakMunCpaLugF5pahUd4g%40mail.gmail.com
>> <https://groups.google.com/d/msgid/robolectric/CABu6A6aAF0gMDDCPU04hA_8HuRc_OOakMunCpaLugF5pahUd4g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Robolectric" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to robolectric...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/robolectric/CA%2Bnow_3psvWjHhnbshYvQ1QifURnVB-vutU3qvJ51X5-JkOAyw%40mail.gmail.com.
>
Reply all
Reply to author
Forward
0 new messages