EasyMock provides Mock Objects for interfaces in JUnit tests by generating them on the fly using Java's proxy mechanism. Due to EasyMock's unique style of recording expectations, most refactorings will not affect the Mock Objects. So EasyMock is a perfect
Test driven development (TDD) is emerging as one of the most successful developer productivity enhancing techniques to be recently discovered. The three-step: write test, write code, refactor – is a dance many of us are enjoying. This site is dedicated to promoting techniques, tools, and general good will in the test-driven community.
The simple, flexible Marathon Java testing tool reached version 1.0. With this Marathon garnered the ability to record almost all actions on standard Java/Swing controls including drag and drop. Marathon records all actions on unrecognized user interface elements, so you can use Marathon for even automating actions on non-standard components. Use custom component resolvers to further extend Marathon to record semantic actions on your custom components. Benefit from the improvements to Marathon, like dock-able windows, cut&paste operations in the editors and of course, tabbed editing facilities. Download Marathon now and explore the possibilities of test automation.
FReT is a common lisp package for testing common lisp software. Version 0.3 is at present at least as functional as any such software publically available, but still far from complete.
iValidator is a framework for XML-based test automation of complex test scenarios. iValidator is completely written in Java. The framework is available under an open source licence.
For those of you who've got into it you'll know that test driven development is great. It gives you the confidence to change code safe in the knowledge that if something breaks you'll know about it. Except for those bits you don't know how to test. Until now XML has been one of them. Oh sure you can use "<stuff></stuff>".equals("<stuff></stuff>"); but is that really gonna work when some joker decides to output a <stuff/>? -- damned right it's not ;-)
W3C Schema can quickly become complex and difficult to determine if they are validating the correct vocabulary. The addition of embedded Schematron schema only makes this problem worse. Schema Unit Test (SUT) introduces a framework for testing XML Schema.
This framework has two parts.
The first is a namespace and vocabulary for embedding test cases into sample XML documents, designed to highlight what is legal and what is not legal in the vocabulary defined in the schema under test. This aspect is independent of what schema language is used and can in theory be applied to any schema language with automatic validation tools.
The second part is a Java implementation using JUnit for testing a W3C Schema with embedded Schematron schema. This implementation reads SUT test suite descriptions written in XML with embedded test cases as described above and then creates a JUnit test suite that can be executed inside JUnit in the usual way.
Feedback is vital for the practice of Continuous Integration (CI) -- in fact, it's the life blood of a CI system. Rapid feedback enables speedy responses to build events that require attention. Without feedback mediums like e-mail or RSS, builds in a broken state have the tendency to stay broken, which defeats the purpose of CI in the first place! In this installment of Automation for the people, automation expert Paul Duvall examines various feedback mechanisms that you can incorporate into CI systems.
Phantastic!
"EclEmma is a free Java code coverage tool for Eclipse, available under the Eclipse Public License. Internally it is based on the great EMMA Java code coverage tool, trying to adopt EMMA's philosophy for the Eclipse workbench:
* Fast develop/test cycle: Launches from within the workbench like JUnit test runs can directly be analyzed for code coverage.
* Rich coverage analysis: Coverage results are immediately summarized and highlighted in the Java source code editors.
* Non-invasive: EclEmma does not require modifying your projects or performing any other setup.
The Eclipse integration has its focus on supporting the individual developer in an highly interactive way.
The update site for EclEmma is http://update.eclemma.org/."
Canoo WebTest is a free open source tool for automated testing of web applications.
It calls web pages and verifies results, giving comprehensive reports on success and failure. The White Paper provides an overview of the features and the design rationale. Detailed information is provided in the Manual Overview as well as the Install and Troubleshooting guides.
In what I hope will be the first of several articles about Guice, a new lightweight dependency injection container from Bob Lee and Kevin Bourillion from Google, this article examines the simplest and most obvious use case for the Guice container, for mocking or faking objects in unit tests. In future articles I will examine other, more ambitious areas where it can be used, including dependency elimination in large code bases.
The key to agility is being able to modify code easily and safely. The problem is that many Java applications are too brittle to extend and enhance easily. Attempts to fix or extend - no matter how carefully done - can introduce more bugs and more complexity.
With a full suite of characterization tests generated by JUnit Factory you can bring your legacy code under control. Download our free plug-in for Eclipse to get started.
Testability-explorer is a tool which analyzes java byte-codes and computes how difficult it will be to write unit-test. It attempts to help you quantitatively determine how hard your code is to test and, where to focus to make it more testable.
Test metric tool can be used:
1. As a learning tool which flags causes of hard to test code with detailed breakdown of reasons.
2. To identify hard to test hair-balls in legacy code.
3. As part of your code analysis-toolset.
4. As a tool which can be added into continuous integration that can enforce testable code.
This article demonstrates a brand new open source library for unit testing, called Unitils. Unitils helps you in writing simple and maintainable unit tests with JUnit or TestNG . It glues together some widely used test libraries like DbUnit and EasyMock and offers integration with Spring and Hibernate . Unitils encourages applying good practices and unit testing guidelines. The ideas behind the code are based on the authors' concrete experience on enterprise projects.
Unitils offers following features
* Equality assertion through reflection, with options like ignoring Java default/null values and ignoring order of collections
* Support for database testing involving test data management with DbUnit, automatic maintenance of unit test databases and automatic constraints disabling
* Hibernate integration features such as session management and testing the mapping with the database
* Integration with Spring, involving ApplicationContext management and injection of spring managed beans
* Integration with EasyMock and injection of mocks into other objects
It turns out I’ve amassed a heck of a lot of Javascript. It started out as simple effects. Then it progressed to some widgets. Now I ended up looking at Javascript as a valid tool in the arsenal.
Summary Eclipse offers the possibility to build plug-ins automatically outside the Eclipse IDE, which is called "headless build". Eclipse itself is built headless and since Eclipse is an assembly of plug-ins, this feature is also available for any other p
Selenium is a test tool for web applications. Selenium tests run directly in a browser, just as real users do. And they run in Internet Explorer, Mozilla and Firefox on Windows, Linux, and Macintosh. No other test tool covers such a wide array of platform
RMock 2.0.0 is a Java mock object framework to use with jUnit. RMock has support for a setup-modify-run-verify workflow when writing jUnit tests. It integrates better with IDE refactoring support and allows designing classes and interfaces in a true test-first fashion.
Mock is a widely used technology in unit test domain. It shields exteral and unnecessary factors and helps developers focus on the specific function to be tested.
EasyMock is a well known mock tool which can create mock object for given interface at runtime. The mock object's behavior can be fine defined prior the test code in the test case. EasyMock is based on java.lang.reflect.Proxy, which can create dynamic proxy class/object according to the given interfaces. It has the inherent limitation from the Proxy. It can create mock object for given interface only.
Mocquer is a similar mock tool as EasyMock. With the help of Dunamis Project, it extends the function of EasyMock to support mock object creation for both class and interface.
With Marathon you capture user interactions on the applications and also insert assertions to verify that correct processing is taking place. The generated raw script can be refactored to modules for efficient reuse and maintainability. Replay the scripts either manually or integrate Marathon into your build process for automatic execution of the test suites.
Fitnesse for Eclipse Plugin
Add Fit and Fitnesse support to your Eclipse tooling environment!
The FitNesse for Eclipse Plugin enables developers to more easily use the FitNesse and Fit frameworks from within the Eclipse environment.
A question I hear pretty frequently is, “Why a redesign of the admin panel so soon after 2.5?” Those who have attended WordCamps in the past few months have already heard the answer, but for the people who haven’t had that opportunity, this post is for you.
When the community response to the 2.5 admin [...]
AtUnit minimizes boilerplate code in unit tests and guides test development by enforcing good practices.
* mark exactly one field with @Unit to indicate the object under test.
* mark fields with @Mock or @Stub to obtain mock objects
* inject your tests, and your test subjects, using your favorite IoC container
Mock Objects Integration
AtUnit integrates with JMock or EasyMock to provide mock objects:
* obtain a JMock context simply by declaring a field
* annotate fields with @Mock to obtain JMock or EasyMock mock objects
* annotate fields with @Stub to obtain a JMock or EasyMock stub object
... or you can use your own mock objects plug-in with two easy steps:
* implement the MockFramework interface
* annotate your tests with @MockFrameworkClass(MyMockFramework.class)
Container Integration
AtUnit integrates with Guice or Spring to take all of the work out of dependency-injected tests.
With Guice:
* never see the Injector, never write bootstrapping boilerplate!
* @Inject test class fields without even defining a Module
* declaratively obtain mock objects with @Inject @Mock
* if you need more binding flexibility, simply have your test class implement Module
With Spring:
* annotate fields with @Bean to get them from the Spring context
* fields annotated with @Bean which do not appear in your Spring context are added to it automatically! (This includes @Mock and @Stub fields.)
* AtUnit looks for a Spring XML file with the same name as your test, or you can specify the location yourself with @Context("filename")
* Most of the time, you don't even need a Spring XML file!
You can easily plug in other containers in two steps:
* implement the Container interface
* annotate your tests with @ContainerClass(MyContainer.class)
A. Bruun, P. Gull, L. Hofmeister, and J. Stage. Proceedings of the 27th international conference on Human factors in computing systems, page 1619--1628. Boston, MA, USA, ACM, (2009)
R. Burns, B. Walsh, S. O’Neill, and C. O’Neill. Health Policy, 108 (2–3):
269-276(2012)http://dx.doi.org/10.1016/j.healthpol.2012.08.014 (Eurobarometer).
J. Calame, N. Ioustinova, and J. van de Pol. Electronic Notes in Theoretical Computer Science, (October 2007)MR: Stark formalisiertes und mathematisch ergründetes Werk.
Basierend auf der Spezifikation des IUT (gegeben in LTS) wird der Lösungsraum durch data abstraction eingeengt (mittels µCRL). Mittels enumerativ tools (wie TGV) werden dann abstrakte Testfälle generiert. Die konkreten Daten (Ein und Ausgaben!) werden mittels constraint-solving techniques (mittels Prolog) ermittelt.
Future Work soll ermöglichen UML-Spezifikationen als Eingabe zu erlauben und die Testfälle sollen in TTCN-3 generiert werden!
Spätestens dann wird dieser Ansatz für IST-SPL sehr interessant..
A. Carniello, M. Jino, and M. Chaim. Journal of Computer Science & Technology, (2005)ST: Vorgehensweise:
Die Technik arbeitet mit einem Test-kriterium, welches auf Basis der Struktur von Use-Cases entwickelt wird. Die Struktur bildet sich durch Assoziationen, Include- und Extend Beziehungen. Testkriterien sind die Auführung von Use Cases mit allen include und extend Beziehungen, oder die Kombination von extend Beziehungen. Die Rechtfertigung nach dieser Technik vorzugehen liegt darin, das bei dieser Technik mehr Fehler gefunden werden können als bei einem reinen funktionalen Test.
Eignung:
Nach dem Lesen stellte sich heraus, dass keine Flussdiagramme für den Kontrollfluss der Use-Cases verwendet werden sondern nur die Struktur der Use Cases. Daher ist der Ansatz eher ungeeignet..
T. Chang, T. Yeh, and R. Miller. (2010)Tsung-Hsiang Chang
MIT CSAIL
vgod@mit.edu
Tom Yeh
UMIACS & HCIL
University of Maryland
tomyeh@umiacs.umd.edu
Robert C. Miller
MIT CSAIL
rcm@mit.edu.
M. Chen, X. Qiu, W. Xu, L. Wang, J. Zhao, and X. Li. The Computer Journal, (2007)MR: Der Ansatz ist ein Gray-Box-Ansatz, obwohl es auf Modellen basiert, muss das Programm selbst auch ausgeführt werden um bestimmte Eingaben für das Verfahren zu liefern.
Die Generierung von Testdaten ist kaum automatisiert.
Für IST-SPL interessant wegen den Formalismen für Aktivitätsdiagramme..
T. Chen, S. Tang, P. Poon, and T. Tse. QSIC '05: Proceedings of the Fifth International Conference on Quality Software, page 55--63. Washington, DC, USA, IEEE Computer Society, (2005)
K. Claessen, and J. Hughes. ICFP '00: Proceedings of the fifth ACM SIGPLAN
international conference on Functional programming, page 268--279. New York, NY, USA, ACM, (2000)
M. Cohen, M. Dwyer, and J. Shi. ROSATEA '06: Proceedings of the ISSTA 2006 workshop on Role of software architecture for testing and analysis, page 53--63. New York, NY, USA, ACM, (2006)MR: Ünsere" OVM-Notation wird auf ein relationales Modell abgebildet, um damit Abdeckungskriterien für das Testen von SPL definieren zu können. Mit diesen Kriterien kann die Information gesammelt werden für sogenanntes 'cumulative variability coverage' mit dem gezielt die Testaufwände für neue Produkte der SPL festgelegt werden können. Das Ganze wird durch combinatorial interaction testing ermöglicht. Diese Technik (aus Einzelsystemen bekannt) reduziert die hohe Anzahl von möglichen Kombinationen von Input-Variablen auf wenige Repräsentanten.
Bei IST-SPL könnte man überlegen, diese Technik als Ergänzung einer anderen einzuführen, um höhere Abdeckungsraten zu erreichen.
Der Nachteil ist jedoch immer noch, dass hierbei keine Orakel erstellt werden. Hierfür verweisen die Spezialisten von Combinatorial Testing auf Model Checking beispielsweise..
C. Costa, J. Silva, and M. Aparício. Proceedings of the 25th annual ACM international conference on Design of communication, page 263–268. New York, NY, USA, ACM, (2007)
D. Deng, W. Zhang, and S. Lu. Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, page 785--802. ACM, (2013)