Simple Functional Test: MarkDown report

A SimpleFunctionlTest plugin: displays a set of fixtures call as a sequence diagram

Лицензия

Лицензия

Группа

Группа

com.github.slezier
Идентификатор

Идентификатор

sft-md-report
Последняя версия

Последняя версия

1.10
Дата

Дата

Тип

Тип

jar
Описание

Описание

Simple Functional Test: MarkDown report
A SimpleFunctionlTest plugin: displays a set of fixtures call as a sequence diagram
Ссылка на сайт

Ссылка на сайт

https://github.com/slezier/SequenceDiagramPlugin

Скачать sft-md-report

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.slezier/sft-md-report/ -->
<dependency>
    <groupId>com.github.slezier</groupId>
    <artifactId>sft-md-report</artifactId>
    <version>1.10</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.slezier/sft-md-report/
implementation 'com.github.slezier:sft-md-report:1.10'
// https://jarcasting.com/artifacts/com.github.slezier/sft-md-report/
implementation ("com.github.slezier:sft-md-report:1.10")
'com.github.slezier:sft-md-report:jar:1.10'
<dependency org="com.github.slezier" name="sft-md-report" rev="1.10">
  <artifact name="sft-md-report" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.slezier', module='sft-md-report', version='1.10')
)
libraryDependencies += "com.github.slezier" % "sft-md-report" % "1.10"
[com.github.slezier/sft-md-report "1.10"]

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
com.github.slezier : sft-core jar 1.10
org.jsoup : jsoup jar 1.7.2
junit : junit jar 4.11

test (5)

Идентификатор библиотеки Тип Версия
com.github.slezier : sft-core test-jar 1.10
net.sourceforge.cssparser : cssparser jar 0.9.10
org.easymock : easymock jar 3.1
org.powermock : powermock-module-junit4 jar 1.5
org.powermock : powermock-api-easymock jar 1.5

Модули Проекта

Данный проект не имеет модулей.

# SimpleFunctionalTest

A JUnit extension to easily adopt functional testing and acceptance testing

step 1: make your test readable

In JUnit test: refactor your test in order to make it more readable by non java native speaker.

  • Add comment before class or test method
  • Use expressive names (camelCase or underscore) for your class, test methods and other methods
  • In your test ONLY use method calls

A 'more' readable JUnit test for a non native java speaker:

...
/*
As an Account Holder
I want to withdraw cash from an ATM
So that I can get money when the bank is closed
*/
public class AccountHolderWithdrawCash {
	...
	@Test
	public void accountHasSufficientFunds() {
		givenTheAccountBalanceIs100Dollars();
		andTheCardIsValid();
		andTheMachineContainsEnoughMoney();

		whenTheAccountHolderRequests20Dollars();

		thenTheAtmShouldDispense20Dollars();
		andTheAccountBalanceShouldBe80Dollars();
		andTheCardShouldBeReturned();
	}

	private void givenTheAccountBalanceIs100Dollars(){
	    ...
	}
    ...
}

step 2: add SimpleFunctionalTest

In your pom file: insert dependencies to SimpleFunctionalTest

<project>
	...
	<dependencies>
		...
		<dependency>
			<groupId>com.github.slezier</groupId>
			<artifactId>SimpleFunctionalTest</artifactId>
			<version>1.8</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
</project>

and specify SimpleFunctionalTest as JUnit runner:

...
@RunWith(SimpleFunctionalTest.class)
public class AccountHolderWithdrawCash {
	...

step 3: enjoy

Run the test.

Open the html file generated:

A simple acceptance test using SFT

Other fixtures

Use weirds characters or specify the way is displayed.

Parameterize your fixture.

Links use cases together.

Manage test context.

Decorate: Table of content, breadcrumb, group fixtures, fixture displayed as table.

Deeper

How to use SimpleFunctionalTest

See also

Available release:

  • 1.9: New usecase decorator: Synthesis jar doc
  • 1.8: Can add new decorator, context is displayed even if failure occurs jar doc
  • 1.7: Better ide integration, Fix configuration uses, add Group decorator for scenarios jar doc
  • 1.6: Table decorator, @Displayable @Before @After @BeforeClass @AfterClass from FixturesHelper, preserve empty line in scenario jar doc
  • 1.5: Bug fix jar doc
  • 1.4: Bug fix jar doc
  • 1.3: Decorators and setting jar doc
  • 1.2: Using test context jar doc
  • 1.1: Basic testing: UseCase Scenario Fixture SubUseCase and FixtureHelper jar doc

Версии библиотеки

Версия
1.10