2
\$\begingroup\$

Moving from J2EE industry to Android development there is a question in my mind, about continuous integration to perform smoke or integration testing.

I'm building a single game, a memory card game, with junit for small logic testing of classes but cannot figure how to implement the testing for the use of canvas.

If the application is developed just with UI elements from android, it is easy to use the UI Testing environment on the SDK: UI android automatic testing

but what for canvas?

I would try to explain the current infrastructure:

  1. github or bitbucket as CSV

  2. Jenkins server

Which captures with SCM a commit on github or bitbucket, download the changes, compiles and executes all the junit on the application for fail-fast.

  1. TestRail

Where the testcases for QA are described


While working on J2EE industry I had, a part from previous ones:

  1. JBehave (http://jbehave.org/)

Which reads from testrail all the testcases linked to a Test plan and executes it (the test-cases should use a pattern)

ex:
Preconditions:
1. Be on login screen

Steps:
1. Fill login with *{username}*
2. Fill password with *{password}*
3. Click on button *Login*

Expected:
1. 
2.
3. Message with info *Login error*
  1. Jemmy

As the link you can find above, it is used to test java swing components, looks for a common element and interacts with it.

So, from jenkins:

1. we check for changes on code
2. compile the code
3. execute junit
4. execute BDD (deploy code on a server, and execute the integration-testing with jbehave)

graphically it is shown as a pipeline: enter image description here


My question is:

  • Is it possible to implement the part I miss, the automatic testing, on canvas application?

As the application can be run on multiple devices, each one with different screen sizes, menu positions, I don't like to use x,y coordinates on tests definitions.

Was anyone in my same concern and found a correct "best practices" solution?

Currently, our QA team, is moving from excel, yeah you read it right, from excel to test rail, so moving from manual testing for test-cases to automatic fail-fast continuous integration would help QA as Development team.

Thank you!!!

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Those practices are more often than not skipped by game developers since they require too much effort with too little benefits. An AAA game relies on bug reporting and debugging tools rather than hand crafted tests for each and every component in it. The real tests are literally done by hired players, which are given appropriate reporting tools. \$\endgroup\$ Commented Nov 18, 2013 at 11:31
  • \$\begingroup\$ it would be hard to implement, ofc, but one-time the work is done, it can save a lot of time of testing, imagine a scenario where you have a football game where the ball cannot go though the screen "walls". You can create a 16 test-cases to shoot a ball in various directions, the game passes that test for RELEASE_1, but a change for RELEASE_2 fast-fail one test-case which could be easy corrected. Regression tests are so expensive as not having that kind of test, that's why I asked ;) \$\endgroup\$ Commented Nov 18, 2013 at 11:37
  • \$\begingroup\$ In a large game, the effort put into writing the tests doesn't scale in an encouraging manner. Hence the army of testers that think of or mistakenly do things the coders don't even manage to take into account. Thus, invest in having good bug reporting tools, as you're most likely not going to keep up the pace with writing test cases for new features (a game has to get on the market in a predetermined amount of time and apart from official patches, there are no versions of that game getting released afterwards). Business apps and game development need different strategies. \$\endgroup\$ Commented Nov 18, 2013 at 15:22
  • \$\begingroup\$ but what I'm looking for is how to interact with the canvas, maybe create a Decorator that access to package variables and implements gets so the test-api can access the position of the current character. Testers puts effort into writing testcases, for example test-rail, but for each release on the market (Android,iPhone,xbox live) you have to perform a regression test that test the whole product, implementing something that can perform that test automatically for you free the tester to perform more business testing than regression. The effort is done once, run anytime. \$\endgroup\$ Commented Nov 18, 2013 at 15:35

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.