You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+47-20Lines changed: 47 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,13 @@ What you think is what you test... Not yet another testing API or framework!
2
2
3
3
Matter | Badges
4
4
------ | ------
5
-
Software factory | [](https://search.maven.org/#artifactdetails%7Ccom.github.xapn%7Ctest-as-you-think-core%7C0.4%7C)[](https://travis-ci.org/xapn/test-as-you-think)[](https://travis-ci.org/xapn/test-as-you-think)[](http://javadoc.io/doc/com.github.xapn/test-as-you-think-core)[](http://www.gnu.org/licenses/lgpl-3.0)
5
+
Software factory | [](http://search.maven.org/#search%7Cga%7C1%7Ctest-as-you-think) master: { [](https://travis-ci.org/xapn/test-as-you-think),[](https://codecov.io/gh/xapn/test-as-you-think) } develop: { [](https://travis-ci.org/xapn/test-as-you-think),[](https://codecov.io/gh/xapn/test-as-you-think/branch/develop) } [](http://javadoc.io/doc/com.github.xapn/test-as-you-think-core)
Social | [](https://twitter.com/search?q=%23TestAsYouThink)[](https://twitter.com/XEngineer)[](https://github.com/xapn/test-as-you-think/stargazers)[](https://github.com/xapn/test-as-you-think/watchers)[](https://github.com/xapn/test-as-you-think)
7
+
Licensing | [](http://www.gnu.org/licenses/lgpl-3.0)[](https://github.com/xapn/test-as-you-think/graphs/contributors)
8
+
Social coding | [](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgoo.gl%2FXqS4Zf)[](https://twitter.com/intent/follow?screen_name=xengineer)[](https://github.com/xapn/test-as-you-think/stargazers)[](https://github.com/xapn/test-as-you-think/watchers)[](https://github.com/xapn/test-as-you-think/network)
9
+
10
+
Please use this [permalink](https://goo.gl/XqS4Zf) to share this web page and to get [analytics data](https://goo.gl/#analytics/goo.gl/XqS4Zf/all_time). You can also use this [QR code](https://chart.googleapis.com/chart?cht=qr&chs=150x150&choe=UTF-8&chld=H&chl=https://goo.gl/XqS4Zf).
@@ -26,11 +30,16 @@ Social | [
27
31
-[Unexpected failures](#unexpected-failures)
28
32
+[Time limit](#time-limit)
29
-
-[Release Notes](#release-notes)
30
-
*[Version 0.4: Time limit as an expectation](#version-04-time-limit-as-an-expectation)
31
-
*[Version 0.3: TestAsYouThink as a Maven distributed OSS library](#version-03-testasyouthink-as-a-maven-distributed-oss-library)
32
-
*[Version 0.2: Test fixtures as method arguments](#version-02-test-fixtures-as-method-arguments)
33
-
*[Version 0.1: Given-When-Then as a canvas](#version-01-given-when-then-as-a-canvas)
33
+
-[Code Examples](#code-examples)
34
+
-[Releases](#releases)
35
+
*[Versioning](#versioning)
36
+
*[Release Notes](#release-notes)
37
+
+[0.4.2 version: Cobertura as a code coverage analyzer](#042-version-cobertura-as-a-code-coverage-analyzer)
38
+
+[0.4.1 version: Travis CI as a continuous integration platform](#041-version-travis-ci-as-a-continuous-integration-platform)
39
+
+[0.4 version: Time limit as an expectation](#04-version-time-limit-as-an-expectation)
40
+
+[0.3 version: TestAsYouThink as a Maven distributed OSS library](#03-version-testasyouthink-as-a-maven-distributed-oss-library)
41
+
+[0.2 version: Method arguments as test fixtures](#02-version-method-arguments-as-test-fixtures)
42
+
+[0.1 version: Given-When-Then as a canvas](#01-version-given-when-then-as-a-canvas)
34
43
-[License](#license)
35
44
36
45
<!-- tocstop -->
@@ -46,7 +55,7 @@ Social | [ that is a grammatical protocol used in the [Behavior-Driven Development](https://en.wikipedia.org/wiki/Behavior-driven_development) method to write test scenarii in a business human-readable way by specifying a software behavior basing on concrete examples. Given-When-Then serves to divide any test into the three eponym steps. This canvas is implemented by the *TestAsYouThink* project to deliver a [DSL](https://en.wikipedia.org/wiki/Domain-specific_language) style fluent API.
58
+
Moreover *TestAsYouThink* uses the [Given-When-Then](https://www.agilealliance.org/glossary/gwt/) canvas as a formal guide to compose tests. This canvas originally comes from [Gherkin](https://sites.google.com/site/unclebobconsultingllc/the-truth-about-bdd) that is a grammatical protocol used in the [Behavior-Driven Development](https://en.wikipedia.org/wiki/Behavior-driven_development) method to write test scenarii in a business human-readable way by specifying a software behavior basing on concrete examples. [Given-When-Then](https://www.agilealliance.org/glossary/gwt/) serves to divide any test into the three eponym steps. This canvas is implemented by the *TestAsYouThink* project to deliver a [DSL](https://en.wikipedia.org/wiki/Domain-specific_language) style fluent API.
Let us complete the previous scenario with a very simple example of what you can do, while testing a non-void method of your system under test.
82
+
Let us complete the previous scenario with a very simple example of what you can do, while testing a non-void method of your system under test (abbreviated as SUT later).
The advantage of TestAsYouThink is that the time limit is only applied to the tested event, while [JUnit](https://github.com/junit-team/junit4/wiki/timeout-for-tests) applies its `timeout` to the whole test method with its `@Test` annotation. [JUnit 5](http://junit.org/junit5/docs/snapshot/user-guide/) will propose an `assertTimeout(duration, lambda)` method that returns the lamba result, but such a syntax amalgamates irremediably the expectations and the event.
302
312
303
-
# ReleaseNotes
313
+
# CodeExamples
314
+
315
+
You can find concrete examples of use in the following repositories.
316
+
- [TestAsYouThink examples](https://github.com/xapn/test-as-you-think-examples), with didactic, funny examples of use: do not hesitate to add your own examples being creative.
317
+
- [Fizz-Buzz](https://xapn.github.io/fizz-buzz), a coding dojo with many JUnit tests.
318
+
319
+
# Releases
320
+
321
+
## Versioning
322
+
323
+
To understand how version numbers change, please read the [SemanticVersioning](http://semver.org/).
324
+
325
+
## ReleaseNotes
326
+
327
+
### 0.4.2 version:Cobertura as a code coverage analyzer
328
+
329
+
-Generate the documentation TOC updating with [markdown-toc](https://github.com/jonschlinkert/markdown-toc) and commit the documentation change while building with Maven.
330
+
-Check code coverage with [Cobertura](http://cobertura.github.io/cobertura/) and publish reports to [Codecov](https://codecov.io/) while building with [Travis CI](https://travis-ci.org).
304
331
305
-
##Version0.4.1:TravisCI as a continuous integration platform
332
+
### 0.4.1 version:TravisCI as a continuous integration platform
306
333
307
334
-Build the project with [TravisCI](https://travis-ci.org).
308
335
309
-
##Version0.4:Time limit as an expectation
336
+
### 0.4 version:Time limit as an expectation
310
337
311
338
-Expect that the system under test replies within a time limit.
312
339
-Resolve ambiguous method calls in relation to using expression lambdas.
313
340
-Start to write a test with the when step.
314
341
315
-
##Version0.3:TestAsYouThink as a Maven distributed OSS library
342
+
### 0.3 version:TestAsYouThink as a Maven distributed OSS library
316
343
317
-
-Rename the API to **TestAsYouThink**.
344
+
-Rename the API to *TestAsYouThink*.
318
345
-Choose an open source license.
319
346
-Publish artifacts to MavenCentral.
320
347
-Check version updates.
321
348
322
-
##Version0.2:Test fixtures as method arguments
349
+
### 0.2 version:Method arguments as test fixtures
323
350
324
351
-Include a data as a method argument during the preparation phase.
325
352
-Include two data as method arguments during the preparation phase.
@@ -329,7 +356,7 @@ The advantage of TestAsYouThink is that the time limit is only applied to the te
329
356
-Verify failures while invoking methods with arguments.
330
357
-Verify the expected exception and the expected message separately.
331
358
332
-
##Version0.1:Given-When-Then as a canvas
359
+
### 0.1 version:Given-When-Then as a canvas
333
360
334
361
-Write an unit or integration test by using the Given-When-Then canvas and full sequence.
335
362
-Delegate the system under test instantiation to the API.
@@ -344,4 +371,4 @@ The advantage of TestAsYouThink is that the time limit is only applied to the te
344
371
345
372
# License
346
373
347
-
*TestAsYouThink* is distributed under the GNULGPLv3 license. TheLGPLv3 license is included in the LICENSE.txt file. More information about this license is available at http://www.gnu.org.
374
+
*TestAsYouThink* is distributed under the GNULGPLv3 license. TheLGPLv3 license is included in the LICENSE.txt file. More information about this license is available at http://www.gnu.org.
0 commit comments