Saturday, April 12, 2008

Android Developer Challenger: Electron Acceptance and Unit Testing Framework

My first intention was to submit a different application, but in the process of developing this application and trying to apply Test Driven Development and Design techniques, I found that although Google is providing JUnit in Android, it was not fully supported, fully documented, fully whatever.

Some Unit Tests can be run in Eclipse, but you were not be testing on the real target. So be careful on that.

Google also provides application instrumentation code through Instrumentation class. When running with instrumentation turned on, this class will be instantiated for you before any of the application code, allowing you to monitor all of the interaction the system has with the application. An Instrumentation implementation is described to the system through an AndroidManifest.xml's .

In the process of writing my own library and tools, I discovered Phil Smith's positron an Open Source library, so I decided to extend his excellent work and bring some new and missing pieces to the table.

And although positron is the anti-particle of the electron, and they annihilate if collide, take for granted that it's not the idea here, but more the conservation of the energy and the generation of some "visible light and waves".

Featured components

Android Electron Acceptance And Unit Tests
Android Electron Acceptance and Unit Test contains some sample applications and their tests:
  • Temperature Converter
  • Touch Paint
  • Web Activity
Android Electron Test Results
Android Electron Test Results is the application used to display test results.
In this video demonstration, Temperature Converter application is tested and some tests failures are showed, because the temperature conversion function is not yet implemented and returns always zero, as an step in the Test Driven Development process.

There's also a web service like interface to drive the tests, as showed in this video.

Electron Java SE version to drive the tests from the development environment. The ZIP contains the needed components to run Electron, Javadocs and some sample test scripts.

Tests can be scripted, and for example, the test we saw in the video demonstration before can be written as

#! /usr/bin/env electron

press 123
assert 123
assert 253 123C_=>_253F
Stay tuned. More on Electron later.


Android app development said...

Android is a mobile operating system that has been highly successful because of its incredible features. Most of the smart phones in the market run on Android OS. Since the success of Android, lot of Android Development Companies has spurred up everywhere. We are also putting good logic to develop more in this field.Android app developers

Prakash said...

you have written an excellent blog.. keep sharing your knowledge...
JMeter Training in Chennai
Go Lang Training in Chennai

Lokeswari said...

Excellent blog and I really glad to visit your post. Keep continuing...

web designing course in chennai | online internships for civil engineering students | online internship for mechanical engineering | online internship for mba students | online internship for computer science students | online internship for biotech students | internships for ece students | internship for electrical engineering student | internship for ece students

periyannan said...

Great blog...! This blog contains useful information I really glad to visit your post. Keep continuing....

what internship is all about
where to do internship
what internship should i do
How will internship benefit you
internship providing companies in chennai
internship program in chennai
How internship works
internship permission letter
internship with training
internship meaning in tamil

periyannan said...

Great content. Wonderful way of writing. Your style is very unique. Waiting for your future posts.
internship mail format , What internship means , internship hiring companies , internship without degree , internship without experience , internship acknowledgement , internship 2022 summer , internship training online , internship websites in india , internship completion certificate

sharmi kaashiv infotech said...

interesting blog...
i really love the way you design the page..

internship completeion letter , internship certificate online , internship offering companies , internship offer letter , internship acceptance letter , internship and apprenticeship difference , how many internships should i do , internship and inplant training difference , internship guidelines for students , why internship is necessary

Poovarasan said...

A very interesting blog....
ups computer full form
kb full form
love full form
rpm full form
ide full form in computer
dtp full form
d v d full form
bca full form and subjects
swat full form
micr full form in computer

Sarvesh said...

Perk up with technical knowledge from AWS Training in Chennai from Infycle Technologies, the major software training Institute in Chennai. A great place to learn courses like Cyber Security, Graphic Design and Animation, Block Security, Java, Cyber Security, Oracle, Python, Big data, Azure, Python, Manual and Automation Testing, DevOps, Medical Coding etc., with outstanding training with experienced trainers and friendly environment with 100+ Live Practical Sessions and Real-Time scenario after the completion of the course the trainee, will able to crack the interview in top MNC’s with an amazing package for more queries approach us on 7504633633, 7502633633.

Akash said...

Very easy to understand your article. Thanks for taking the time to share this article.
Free Ecommerce Platform in chennai
Ecommerce Platform For Small Business in chennai
Best Platform For Ecommerce Website in chennai