Cactus (Framework)

Cactus (Framework)
Jakarta Cactus
Jakarta Cactus Logo.gif
Entwickler Apache Software Foundation
Aktuelle Version 1.8.1
(18. Januar 2009)
Betriebssystem plattformübergreifend
Programmier­sprache Java
Kategorie Test-Framework
Lizenz Apache License 2.0
jakarta.apache.org/cactus

Cactus ist ein Test-Framework, das von der Apache Software Foundation im Jakarta-Projekt entwickelt wird. Es baut auf dem JUnit-Test-Framework auf, wird jedoch für serverseitige Tests benutzt, z. B. zum Testen von Servlets, EJBs, Tag libs und JSPs.

Cactus mocked die Servlet- bzw. EJB-Container nicht weg, sondern lässt die Tests innerhalb des Containers laufen. Dazu verwendet es Codehaus Cargo um den jeweiligen Container zu instrumentieren [1] und HttpClient um die HTTP Verbindungen aufzubauen.[2]

Cactus sieht sich als Framework für integrative Unit-Tests - d. h. Unit-Tests, die die Interaktionen mit dem Container testen. Cactus ist aber auch für logische Unit-Tests (testen z. B. die Applikationslogik) und funktionelle Unit-Tests (testen z. B. HTTP Request / Responses) einsetzbar.[3]

Inhaltsverzeichnis

Funktionalität

Cactus ermöglicht es Unit-Tests für Servlets[4], JSPs[5], Filters[6] und EJBs[7] zu schreiben. Es ermöglicht auch die Integration von HTTP-Unit und HTML-Unit und somit HTTP & HTML Response Objekte zu testen.

Cactus erlaubt es am Client HTTP & Servlet Cookies, HTTP Parameter und Header, Authentifizierungs-[8] und Form Parameter zu setzen und HTML Text, Cookies, HTTP Header und Response Codes zu prüfen.[2]

Cactus Tests können von einem Browser aus gestartet werden; ihr Ergebnis kann entweder in XML oder HTML dargestellt werden. Cactus Tests können aber auch mittels Apache Ant und Apache Maven in den Entwicklungsprozess eingebaut werden und somit im Rahmen des Unit-Tests am Server ausgeführt werden.[2]

Alternativen

  • Verwendung eines reinen Unit-Test-Frameworks wie JUnit gemeinsam mit einem Mocking Framework wie Easymock um die am Server laufende Applikationslogik zu testen.
  • Verwendung von HTTP-Unit oder HTML-Unit um funktionelle Unit-Tests oder Request-übergreifende Fachlichkeiten zu testen.
  • Verwendung von Testautomatisierungswerkzeugen um die Web-Applikation gesamtheitlich fachlich zu testen.

Weblinks

Einzelnachweise

  1. Cactus Abhängigkeiten
  2. a b c Cactus Features
  3. Cactus Beschreibung - Abschnitt "Different kinds of unit tests"
  4. HowTo Servlet
  5. HowTo JSP
  6. HowTo Filter
  7. HowTo EJB3
  8. HowTo Security

Wikimedia Foundation.

Игры ⚽ Нужна курсовая?

Schlagen Sie auch in anderen Wörterbüchern nach:

  • Cactus Framework — Infobox Software name = Cactus Framework developer = [http://www.cactuscode.org/ Cactus Team] latest release version = 4.0 beta 15 latest release date = November 2, 2004 operating system = Cross platform genre = Software framework license = LGPL… …   Wikipedia

  • Cactus (disambiguation) — Cactus may refer to: Plants * Plant family: Cactus * For the genus Cactus, see Mammillaria, Melocactus and Opuntia Culture * Cactus TV an English television production company * Cactus (band) an American rock band * Cactus (song) a song by The… …   Wikipedia

  • Cactus — Das Wort Cactus (für „Kaktus“) bezeichnet die erste, nach dem taxonomischen System von Carl von Linné, beschriebene Gattung in der Familie der Kakteengewächse; heute ein Synonym für die Gattung Mammillaria eine US amerikanische Rockband; siehe… …   Deutsch Wikipedia

  • Jakarta Cactus — Infobox Software name = Jakarta Cactus caption = developer = Apache Software Foundation latest release version = latest release date = latest preview version = latest preview date = operating system = Cross platform programming language = Java… …   Wikipedia

  • Wicket framework — Apache Wicket Тип веб фреймворк Разработчик Apache Software Foundation Написана на Java Операционная система …   Википедия

  • Testautomation — Unter Testautomatisierung (auch Testautomation) ist die Automatisierung von Aktivitäten im Test zu verstehen, sowohl beim Softwaretest als auch beim automatisierten Test von Hardware, dem Hardwaretest. Inhaltsverzeichnis 1 Motivation 2… …   Deutsch Wikipedia

  • Nemeaux — is a supercomputer at the Louisiana State University Center for Computation Technology. Nemeaux consists of thirty two Xserve G5 computers, with an additional dedicated head node. It was purchased with a US$114,000 grant from the Louisiana Board… …   Wikipedia

  • Numerical relativity — is one of the branches of general relativity that uses numerical methods and algorithms to solve and analyze problems. To this end, supercomputers are often employed to study black holes, gravitational waves, neutron stars and many other… …   Wikipedia

  • Adaptive mesh refinement — This article is about the use of adaptive meshing in numerical analysis. See Subdivision surface for the use of adaptive techniques in Computer Graphics modelling. In numerical analysis, adaptive mesh refinement is a method of adaptive meshing.… …   Wikipedia

  • Center for Computation and Technology — The Center for Computation and Technology, or CCT, is an interdisciplinary research center located on the campus of Louisiana State University in Baton Rouge, LA.LSU previously housed the Center for Applied Information Technology and Learning,… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”