Browsing projects by Tag(s)

Select a tag to browse associated projects and drill deeper into the tag cloud.

Showing page 1 of 1

Doctest for JavaThis port of Python's Doctest provides a simple implementation of javadoc's Doclet interface that produces XML fragments, a JSON index and javascript tests. CSS, HTML and an AJAX documentation browser are also included. This package is a work in progress, I use it to ... [More] document less4j. Document and test Java at onceText tagged with @test is compiled by Rhino and saved individually in a doc/tests folder. Tests are expected to be a simple script that returns a boolean, true for success and false for failure. Here is what a brief Doctest comment would look like for java's String.equals method: /** * Compare this String to another one. * * @param string to compare to * @return true if the two strings compared are equals * * @test return ( * "A".equals("A") == true && * "A".equals("a") == false * ); */For documentation purposes doctestj supports the original javadoc tags: @param, @return and @throws. And to enhance your documentation with HTML elements with less markup error, it maps a @h3, @h4, @p and @pre tag to the equivalent HTML titles, paragraph and preformatted text elements. Any other tag (including test) will yield a div element with a CSS class named after the tag. You can still use XHTML markup inside the tagged and the untagged comment text, doctestj will try to validate it and document any XML errors in its output. [Less]

0
 
  0 reviews  |  0 users  |  2,543 lines of code  |  0 current contributors  |  Analyzed 6 days ago
 
 

The RestFixture is a FitNesse fixture that allows developers and/or product owners to write test fixtures for REST API with simplicity in mind. The idea is to write tests that are self documenting and easy to write and read, without the need to write Java code. The fixture allows test writers to ... [More] express tests as actions (any of the allowed HTTP methods) to operate on resource URIs and express expectations on the content of the return code, headers and body. All without writing one single line of Java code. And it also works as a living documentation of the API. Overview: Get Fitnesse With Some Rest, Rest Fixture, Latest Additions Documentation: http://rest-fixture.googlecode.com/files/RestFixture-docs-1.0.zip Other projectsJMeterRestSampler: a plug-in for JMeter to create robustness/performance tests for REST. The project home is here [Less]

0
 
  0 reviews  |  0 users  |  0 current contributors  |  Analyzed 8 days ago
 
 

The primary purpose of this project is to ensure code samples in documentation are up-to-date. This project is typically only useful for software libraries, rather than stand alone applications. For instance, the Jakarta Commons components documentation contains code samples. By marking these ... [More] samples up in simple XML tags, freshdox can be run against your documentation to ensure the code samples are working correctly. Tests can be embedded in documents using XML tags, with a default style sheet which hides certain parts of the code. The method for extracting tests is pluggable, so it is possible to create extractors that extract tests from Word documents etc. The code that executes the tests is also pluggable, so test executors can be written for Java, C, C++, .Net languages etc. Initially this will support Java code samples embedded in XHTML documents, but it is being designed to work with C/C++ and .Net languages also. An example showing integration of freshdox into an Ant build script will be uploaded. Example embedded test: myPet = new Dog('Rover', 250.00, 12); myPet!=null && myPet.getName().equal('Rover') && myPet.getWeight()==250.00 The freshdox:condition would be hidden in the actual document, so all you would see is: myPet = new Dog('Rover', 250.00, 12); If it any stage this ceases to work, freshdox will alert the developer. NOTE: In this example, the type of myPet is not specified. Strict Java is not required (although it can be). This allows more natural example code to be written. [Less]

0
 
  0 reviews  |  0 users  |  696 lines of code  |  0 current contributors  |  Analyzed 7 days ago
 
 
Compare

Last update, 25.10.2009. Read more on the News. AboutBDoc documents behaviour specified by unit tests. In its easiest form it is like TestDox, creating simple documentation from the method names in JUnit test cases. In its more advanced form it can produce a quality report, describing ... [More] userstories and behaviour implemented by the code. This will give extra value to the developers and testers of the team. It will contribute on giving attention to unittesting, test-driven development and behaviour-driven development. By showing the report to the business people and testers the developers will get feedback on how they describe the domain, which contributes to code (and developers) being in sync with the UbiquitousLanguage of the project. A quality report giving value can be achieved by adding some thought to how a test is named, writing it as sentence describing behaviour. DanNorh.net gives an excellent article on this topic. If user stories is used on the project it is also possible to reference the user story from the test, adding even more value to the end report. BDoc will structure a report by userstories, specifications and examples. The best documentation are as always examples, so look below. Read more about BDoc on TheServerSide.com ExampleThe code below describes and tests the behaviour of an ExecutiveOfficer. The testcase uses a Reference to a Story, one scenario, one statement and a few specifications. Running BDoc on this code, together with testcases for Task and TaskList, will produce the report shown below. BDoc now requires a tiny bdd-framework in order to extract example data. The framework (or the class if you like) must be implemented by your project, in the relevant language. BDoc needs this construction in order to inject proxies into the test, while it is running, analyzing method calls and data for the report. package com.googlecode.bdoc.examples.taskhandling; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; import org.junit.Test; @Ref(Story.TASKTRACKING) public class TestExecutiveOfficerBehaviour extends ExampleSupport { private ExecutiveOfficer currentOfficer; private Task currentTask; @Test public void aNewExecutiveOfficerShouldNotHaveAnyTasksInHisOrHerTaskList() { ExecutiveOfficer officer = new ExecutiveOfficer("Bob"); assertTrue(officer.getTaskList().getList().isEmpty()); } @Test public void defaultAssignmentOfTasksIsToTheCreatorOfATask() { given.officer(new ExecutiveOfficer("Bob")); when.theOfficerCreatesATaskWithDescription("*Register salesorder*"); then.ensureTheTaskIsAssignedToTheOfficer(currentOfficer); } void officer(ExecutiveOfficer officer) { this.currentOfficer = officer; } void theOfficerCreatesATaskWithDescription(String description) { currentTask = currentOfficer.createTask(description); } void ensureTheTaskIsAssignedToTheOfficer(ExecutiveOfficer officer) { assertTrue(officer.isAssignedTo(currentTask)); } @Test public void aTaskShouldBeMarkedWithInprogressWhenItIsStartedByAnExecutiveOfficer() { ExecutiveOfficer officer = new ExecutiveOfficer("Bob"); Task task = officer.createTask("Register salesorder"); officer.start(task); assertTrue(task.getInProgress()); } @Test public void aClosedTaskShouldBeRemovedFromTheTasklist() { given.officer(new ExecutiveOfficer("Bob")); and.theOfficerCreatesATaskWithDescription("*Register salesorder*"); and.theOfficerStartsTheTask(currentTask); when.theOfficerClosesTheTask(currentTask); then.ensureTheTaskIsRemovedFromTheExecutiveOfficer(currentOfficer); } void theOfficerStartsTheTask(Task task) { currentOfficer.start(task); } void theOfficerClosesTheTask(Task task) { currentOfficer.close(task); } void ensureTheTaskIsRemovedFromTheExecutiveOfficer(ExecutiveOfficer officer) { assertFalse(officer.getTaskList().getList().contains(currentTask)); } @Test public void shouldHaveAnEstimatedEtcEqualToTheSumOfTasksAssigned() { given.officer(new ExecutiveOfficer("Bob")); and.theOfficerIsAssigned(tasksForHandlingAStandardSalesOrder()); then.ensureEstimatedEtcInMinutesEquals(12); } void theOfficerIsAssigned(List tasks) { currentOfficer.assign( tasks ); } List tasksForHandlingAStandardSalesOrder() { List list = new ArrayList(); list.add(new Task("Register salesorder",4)); list.add(new Task("Check stock",2)); list.add(new Task("Print and finish order",6)); return list; } void ensureEstimatedEtcInMinutesEquals(int expectedEtc) { assertEquals(expectedEtc, currentOfficer.getTaskList().getEtc()); } }Report generated by BDoc: [Less]

0
 
  0 reviews  |  0 users  |  17,482 lines of code  |  0 current contributors  |  Analyzed about 21 hours ago
 
 
 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.