question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make tests more android friendly

See original GitHub issue

Hey Guys, As I was working on the Tests in the sdk today I discovered that some tests have dependencies on jme3-desktop, which makes them useless for Android.

A) TestFancyCar had some old SettingsDialog imports which were unusued actually. See 479392f

B) TestMipMapGen: We have two MipMapGenerator’s. One in jme3-desktop and one in jme3-core. The Desktop pendant uses AWT, which doesn’t work on Android. Technically they should do the same so the question is if there is a valid reason to still keep the one in jme3-desktop? See 10b23db

Those commits are only applied to 3.1 because I actually pushed them by mistake (my old git tool always asked for the appropriate remote, for this one you have to set it in the settings), so sorry for the inconvenience.

C) TestRenderToMemory uses jme3-desktop’s com.jme3.util.Screenshots. By looking into Screenshots it seems to me that it only depends on AWT for the Buffers however we already have our own buffer implementations so we might be independent from AWT here? Apart from that convertScreenShot2 is a horrible name for jme buffer to Image Object and the name Screenshot itself is also a bit misleading. I don’t know what to do there since I am unfamiliar with the classes, though.

D) TestAbsoluteLocators depends on AWTLoader for the textures however I don’t think it’s possible to have some conditional code for Android there? Maybe we could add a TestAbsoluteLocatorsAndroid and the SDK deletes the relevant test?

E) The whole jme3test.awt package is useless on Android. There are neither Applets nor AWT Canvases to use. The SDK will simply remove the AWT package when creating the Android Tests. Is that okay?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Scrappers-glitchcommented, Nov 23, 2021

@stephengold I think we are not on hurry on this, we can do this after v3.5.0, so i would have fixed things like AndroidHarness and FragmentHarness.

1reaction
stephengoldcommented, Nov 2, 2021

I agree that Android examples should go in a separate repository. That should make things less awkward for JME developers who don’t have Android Studio installed. Perhaps you should commit your Android examples to a new public GitHub repository for review. If they look good, we can fork your repo to JMonkeyEngine or jMonkeyEngine-Contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fundamentals of testing Android apps
This page outlines the core tenets of testing Android apps, including the central best practices and their benefits.
Read more >
Automate UI tests - Android Developers
Testing user interactions helps ensure users do not encounter unexpected results or have a poor experience when interacting with your app.
Read more >
Use test doubles in Android - Android Developers
A good approach for UI tests is to make them compatible with both Robolectric and instrumented tests and decide when to run them...
Read more >
Android Platform Testing | Android Open Source Project
For app testing, start with the Fundamentals of Testing and conduct the Android Testing Codelab using the samples provided. Finally, note basic ...
Read more >
Build local unit tests - Android Developers
Local tests enable you to evaluate your app's logic more quickly. ... To do so, create a class that contains one or more...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found