Trace: » unittest.html

[hemmerling] Unit Test / Module Test

Testing Tools for Unit Test / Module Test

Testing with Instrumented Code or non-instrumented Code

Test Tools and Unit Test Tools for Java

JUnit

Assertions

Mock Objects

Some other Test Tools for Java

Unit Test Tools for C++

Tools

Resources

Unit Test for C

Tools written in C, for C Targets

Free Tools written in C, for C Targets
Tools written in C++, for C Targets
Symbolic Execution of "C" Code
Commercial Tools for C Targets
  • The commercial hitex "Tessy" - “Automated Unit / Module / Integration Testing of Embedded Software” → testing of instrumented C code.

Howto

Practical Examples of Embedded Test Code
Literature

Resources

Unit Test Tools for .NET Languages ( C#,..)

Visual Studio Unit Testing Framework ( "MS Unit Test" / "MS Unit Testing" / "MS Test" )

NUnit

The Tool
Integration of the NUnit GUI to Visual Studio Express
Tools: MS Unit Testing NUnit
Code context Attribute
Class [TestFixture] [TestClass]
Method [Test] [TestMethod]
Parameter description Value
Title NUnit
Command C:\Program Files (x86)\NUnit\bin\
Arguments /run $(BinDir)$(TargetName)$(TargetExt)
Initial directory $BinDir
Debugging of NUnit Tests with Visual Studio Express
  • BlackWasp "Debugging NUnit Tests in C# Express" - “How you can create a simple project within your solution that permits debugging of NUnit tests”.
    • Create a “TestRunner” project in your Visual Studio solution, according to the BlackWasp template.
    • Add “C:\Program Files (x86)\NUnit\bin\lib\nunit-console-runner.dll” as reference to your Visual Studio “TestRunner” project, in the “Solution Explorer” window of Visual Studio, mouse-rightclick on the project, “Add / Reference / Browse”.
    • Set the Testrunner as startup project ( Mouseclick-right on the project in the “Solution Explorer” window, select the menu item “Set as Startup Project” ).
    • The project to be debugged may be either of the type “Windows Application” ( .exe ) or “Class Library” ( .dll ), in the project properties at “Application / Output type”.
    • In the project properties, set “Debug / Start Options - Command line arguments” to ”..\..\..\FizzBuzz\bin\Debug\FizzBuzz.exe” or ”..\..\..\FizzBuzz\bin\Debug\FizzBuzz.dll” respectively, so that the TestRunner calls the project to be tested, properly.

Some other Unit Test and Mocking Tools

Resources

Unit Test Tools for Databases

DbUnit

  • The OpenSource Sourceforge "DbUnit", Sourceforge "DbUnit" - “A JUnit extension (also usable with Ant targeted at database-driven projects that, among other things, puts your database into a known state between test runs”.

daleq

tSQLt

The Tool
Resources

End-to-End Testing of Databases

Unit Test Tools for Delphi / Pascal

Unit Test Tools for FORTH

Unit Test Tools for FORTRAN

Unit Test Tools for Javascript

Tools for Front-end, Client-side Debugging

  • CasperJS. - “A navigation scripting & testing utility for PhantomJS, written in Javascript”.
  • JsUnit, SourceForge "JsUnit", SourceForge "JsUnit" - “A Unit Testing framework for client-side (in-browser) JavaScript”.
  • Phantom JS - “PhantomJS is an optimal solution for Headless Website Testing. Run functional tests with frameworks such as Jasmine, QUnit, Mocha, Capybara, WebDriver, and many other”.
  • Zombie.JS, GitHub "assaf/zombie" - “Insanely fast, headless full-stack testing using Node.js”.

Browser-based Web Application Testing

Tools for Server-side Debugging

JQuery
Online Platforms for Unit Test
Unit Tests
    • “A feature-rich JavaScript test framework running on node.js and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases” # Test Framework #.
    • Mocha makes use of Github "should.js".
  • Github "should.js" - “BDD style assertions for node.js – test framework agnostic”.
    • In 2015-12 expert considered it to be the “ultimative successor of Mocha” :-).
    • “Futuristic test runner”.
    • “Even though JavaScript is single-threaded, IO in Node.js can happen in parallel due to its async nature. AVA takes advantage of this and runs your tests concurrently, which is especially beneficial for IO heavy tests. In addition, test files are run in parallel as separate processes, giving you even better performance and an isolated environment for each test file... Having tests run concurrently forces you to write atomic tests, meaning tests don't depend on global state or the state of other tests”.com/forum/#!topic/nodejs/V16D4D4FUWU|Google Groups “nodejs”, Thread “describe is not defined”]] - “My understanding is that to run the tests with mocha, you must run 'mocha', because mocha creates the 'describe' function, among others. You cannot run the tests by running 'node'”.
npm

CouchDB Tools

Mock Objects

Resources

Testing Tools for Perl

Testing Frameworks

Resources

Unit Test Tools for PHP

PHPUnit Testing Frameworks

PHPUnit Testcase-Runner

Resources

  • Sample error message “PHP Fatal error: Class 'PHPUnit\Framework\TestCase' not found in MoneyTest.php on line 6”.
    • The LAMP distribution “XAMPP 5.6.23 / PHP 5.6.23” for Windows is shipped with PHPUnit 3.7.21.
    • With PHPUnit 3.7.21, the class “TestCase” is not implemented.
    • With PHPUnit 5.5.2, the class “TestCase” is implemented. The online documentation is just for software versions with implemented class “TestCase”.
    • With XAMPP, PHPUnit is shipped as file “phpunit” without file extension, e.g “C:\xampp/php/phpunit”. When updating the installation by a PHAR archive, the updated file must be renamed so that there is no file extension ( e.g. “ren phpunit-5.5.2.phar phpunit” ).

Testing Tools for Windows PowerShell

Python

Testing Tools for & with Python

Property Based Testing with Python, with Help of Data Generators

Very special Helper Tools for Testing for & with Python

Testing Tools for HTTP Resources with Python

Resources

Unit Test Tools for Ruby

Unit Test Tools for Scala

Unit Test Tools for SQL Databases

SQL Unit Test in T-SQL

SQL Unit Test with "Microsoft SQL Server Data Tools ( SSDT )"

  • You may do SQL unit tests with “Microsoft SQL Server Data Tools ( SSDT )” of “Microsoft Visual Studio Professional 2013” and “Microsoft Visual Studio Ultimate 2013”.
  • The free “Microsoft Visual Studio Express 2013” is shipped with an edition of “Microsoft SQL Server Data Tools ( SSDT )” which lacks the unit test feature.
  • Stages:
    1. Pre-Test.
    2. Test.
    3. Post-Test.

Mockup - Simulation of Objects

Tools

Resources

Resources

JUnit 4 ( for Java 1.5 and newer )

Books written and released before 2006 do not cover JUnit 4, but just JUnit 3. Take care of new editions of old books, and of german translations of english books originally written and released before 2006, which still just deal with JUnit 3 !

Books

Online

JUnit 3

Books

Online

.NET Framework

Test double ( Mock, Stub )

General

Stub

Mock

General Resources

 
en/unittest.html.txt · Last modified: 2024/04/14 21:38 (external edit) · []
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki