Writing Testable Code
This article presents practices to write more testable code with many examples in java, going a step further than just TDD.
This article presents practices to write more testable code with many examples in java, going a step further than just TDD.
Testing TV is a directory of software testing and software quality assurance videos and tutorials. It covers unit testing, functional testing, load testing, performance testing, test driven development. configuration management.
link
"If you are looking for a project-orientated functional testing tool and you test applications built using mainstream technologies, you may succeed more easily and get better value out of the Original tools than some of the market leaders.
Original Software’s testing tools are typical in function and structure to most functional test suites. However, they have some key capabilities in the areas of manual testing, database verification and preparation that set them apart."
Paul Herzlich, Software Testing Tools Analyst, Ovum
link
Duncan Thomas Blogs about how to handle Dynamic Elements with LiquidTest, “In this blog post I will explain a small but important feature with an example. This feature is a small check box you see at the bottom of your browser when recording a test with LiquidTest, called Dynamic Element.”
link
Developer testing practices are a vital, yet often under-used art. Learning how to write more effective tests is an excellent way to write better designed, more maintainable and more reliable code. It also helps keep development focused on the real requirements, resulting in a higher quality product for the end user. This is a skill that every Java developer needs to master.
This course is an intensive 2-day workshop with a mixture of teaching and lab exercises. You will learn about modern Agile testing best practices such as Test-Driven Development and Behaviour-Driven Development, and how to apply them in your own projects. You will gain practical experience with the latest in open source testing tools, including JUnit 4.7, Groovy, Selenium, SoapUI, and JOLT-Award winner easyb. You will also learn how to refactor code, and how to use code coverage and code quality tools such as Cobertura to isolate poor quality or poorly-tested code. The basic course program is outlined here:
– Principles of Test-driven development and Behaviour-Driven Development
– Understanding the TDD lifecycle
– Agile testing practices
– Modern unit testing techniques with JUnit 4.x
– Writing clearer tests with the Hamcrest assertions
– Using annotations, parameterized tests and JUnit Theories to simplify your tests
– Writing more productive unit tests in Groovy
– Unit and Integration testing
– Using mock objects and stubs with Mockito
– Database testing with DBUnit
– Testing Spring applications
– Behaviour-Driven Development with easyb
– Automating the testing process
– Using test coverage metrics to improve your testing process
– Testing a web interface with Selenium and JWebUnit
– Continuous Testing in Eclipse with Infinitest
TestRail is a comprehensive web-based test case management software to efficiently manage, track and organize your software testing efforts.
link
The idea of driving development with tests has been popularized by the agile development movement. The fact is that testing and coding are inseparable components of software development. We get the best results with testers and programmers work closely together. How can we deliver real value to the business frequently? How can we know how much testing is enough? Let’s look at how testers and programmers collaborate to produce high-quality software.
link
This article takes the form of a tale to explain the differences between the different "driven development" approaches… and makes us think why there are so many of them?
link
Responsibility driven design is an approach that helps you shift focus from object state to interactions and responsibilities. This article shows how test driven development with mock objects facilitates responsibility driven design and drives you towards a more cohesive, loosely coupled design. Examples in Java.
link
Coverity’s Static source code analysis allows organizations to find & fix defects at the earliest stage in the software development life cycle, saving millions of dollars in associated costs.
link
Ranorex 2 is a Windows GUI test automation framework for testing many different application types including Web 2.0 applications, Win32, MFC, WPF, Flash/Flex, .NET and Java (SWT).
Avoids proprietary scripting languages and instead enables use of the functionalities of programming languages like Python or C# as a base and expand on it with its GUI automation functionality.
The Ranorex Spy tool allows users to explore and analyze host or web applications. Ranorex object repositories and repository browser enables separation of test automation code/recordings from RanoreXPath identification information. The IDE includes test project management, integration of all Ranorex tools (Recorder, Repository, Spy), intuitive code editor, code completion, debugging, and watch monitor.
This is a link to a course I teach through Net Objectives, Inc. It covers a number of aspects of agile database development and puts TDD and testing at the forefront.
link
This is a course that I teach through Net Objectives, Inc. The topic is database agility and, of course, TDD is a central area of concern.
link
This is my short cut, published by Addison-Wesley, on the topic of a technique I dubbed "transition testing."
I view this technique as a critical piece of database agility.
link
Duration
2 days
Description
Test-driven development or TDD is a software development method in which the writing of automated tests controls the writing of the source code.
The cycle recommended by TDD includes five steps:
1. Write a test.
2. Check to see if the test fails.
3. Write the minimum amount of code necessary for the test to pass.
4. Check to see that the test passes.
5. Refactor the code.
TDD is a very effective technique for delivering well-constructed software with a non-regression test suite. Practicing TDD is at the root of Agile software development processes that emphasize rapid and frequent delivery of functional software components. Automated unit tests written in TDD and automated acceptance tests that were written first are unavoidable practices that a good Agile software development team must master.
Objectives
The key objective of this workshop is to master through practice the test-driven development technique. The workshop combines theory, practice, and the experience of an expert trainer who actively participates to the implementation of Agile engineering processes and practices within various development teams.
Once the general concepts of test strategies have been presented, participants will first of all discover code refactoring and the writing of automated unit tests. They will understand the benefits associated with TDD and how to use TDD as a design method. The hands-on exercises will illustrate that TDD is mainly designed to specify a desired behaviour and not to write tests. The course will also address the other types of tests recommended by Agile approaches. We will also discuss the implementation of test strategies as well as advanced concepts such as Mock Objects.
Target audience
This workshop is intended for development teams that wish to discover test-driven development through practice. The workshops are offered in C#, in Java, or in Ruby.
Content
* The different types of tests:
o Unit tests
o Integration tests
o Functional tests
o Acceptance tests
* Code refactoring:
o Basic principles and motivations
o When refactoring should be done
o How refactoring is done
o Code smells
o Most prevalent refactoring
o Implementation
* TDD principles and good practices:
o TDD principles
o Goals and benefits
o Creating tests before programming
o Emergence of design based on tests
* Practicing TDD:
o TDD practice workshops
o Findings and discussions
o Guidelines for object-oriented design
* Advanced techniques:
o Mocks, Stubs, Fakes and Dummies
FEST-Swing is a Java library that provides a fluent interface for functional Swing GUI testing. This library provides an easy-to-use API that makes creation and maintenance of GUI tests easy.
Example:
| Code: |
|
dialog.comboBox("domain").select("Users"); dialog.textBox("username").enterText("leia.organa"); dialog.button("login").click(); dialog.optionPane().requireErrorMessage().requireMessage("Please enter your password"); |
Web Functional Test Tool:
• Cross-platform and cross- browser tool for automated testing of web-based applications, web pages and portals
• Runs under Windows/Linux, FireFox/Mozilla/Internet Explorer/Seamonkey
• Supports regression, load and functional testing
• Capture/Replay
• Jython and Groovy scripting interface
• Intelligent tracking of GUI components on websites via different heuristics
• Tests are tolerant to GUI changes
• Real user simulation
• 100% Ajax-capable
• Integrated test debugger
• Modularization allows creating of reusable, robust tests
• Integration with HP TestDirector for Quality Center
• Supports data driven testing
There is a free demo/evaluation version available on the web2test website.
link
Robot Framework is a generic keyword-driven test automation framework for acceptance level testing and acceptance test-driven development (ATDD). It has an easy-to-use tabular syntax for creating test cases and its testing capabilities can be extended by test libraries implemented either with Python or Java. Users can also create new keywords from existing ones using the same simple syntax that is used for creating test cases.
Robot Framework is open source software released under Apache License 2.0.
link
jsUnity is a lightweight JavaScript testing framework that is context-agnostic. It doesn’t rely on any browser capabilities and therefore can be run inside HTML, ASP, WSH or any other context that uses JavaScript/JScript/ECMAScript.
There are already several unit testing frameworks for JavaScript that are browser-centric. jsUnity aims to just focus on JavaScript as a language that’s used beyond the browser context. jsUnity can be used in server-side JavaScript implementations as well as all popular browsers.
link
The Software Quality Planet is a aggregator for RSS feeds concerning software testing (unit testing, functional testing, regression testing, load testing), code review and inspection, bug and defect tracking, continuous integration.
link
cfix is an open source xUnit testing framework for C/C++, fully specialized for Win32 (32/64 bit) and NT kernel mode development. Licensed under the GNU Lesser Public License 3.0.
Ivonna is an Asp.Net testing tool that allows writing unit tests for your Asp.Net applications. What makes it different is that Ivonna runs in the same process as the test runner.
Unlike other testing tools, Ivonna is not a "client-side" tool. It doesn’t just test the HTML output (although such a possibility exists), it creates and executes an Asp.Net request and allows you to examine the intrinsic objects, such as the Page object. This opens many new possibilities, such as
* Examining properties of page controls and other objects, such as the HttpContext object.
* Mocking external dependencies in order to isolate the page behavior.
* Injecting setup code and assertions into the page’s lifecycle event handlers.
* Injecting mock HttpModules, Filters, and test-specific configuration values.
Ivonna is being developed in partnership with TypeMock and runs on top of the TypeMock Isolator framework.
link
Zephyr provides end-to-end management of the testing lifecycle in the test department including resources, releases and sprints, test cases, scheduling, test execution, defects, documents, collaboration and all aspects of reporting and metrics in real-time.
http://www.getzephyr.com
link
TestLogistics – An Australian professional services organisation specialising in technical software testing solutions and configuration management.
If you want to program in a dynamic language on .Net and use BDD, you might like this. JSNSpec uses specificaiton language similar to RSpec in Ruby and works in the browser, on the server in ASP .Net and in Managed JScript in Silverlight. It is "self-specified" meaning it uses itself to specify itself. This is one way to learn how to use the tool to make specifications for your own projects.
link