Skip to content

hpi-swa-teaching/AcceptIt

Repository files navigation

AcceptIt

Branch Travis CI
master Build Status
develop Build Status

Installation

  1. Make sure you have metacello-work installed in your image.

  2. Follow the following Guide for the git repo setup If you follow the guide there is no need for Step 3.

  3. AcceptIt can be acquired by running following code in the workspace:

Metacello new
  baseline: 'AcceptIt';
  repository: 'github://hpi-swa-teaching/AcceptIt:develop/packages';
  get;
  load

Usage

  1. Choose a class to test like for example "MySickCalculator".

  2. Create a user story by running the following code in the workspace:

ACCEPTIT createUserStory:
'MySickCalculatorACStory
As a enthusiastic Squeak developer
I want to add Integers
In order to calculate sums.'
withCategory: 'Sick-Calculator-Tests'
  1. Create a library like this:
ACLibrary subclass: #MySickACLibrary
	instanceVariableNames: 'result'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Sick-Calculator-Tests'
  1. Add a libraries method on class side to your user story class and make it return the class of it's library
libraries
	^{MySickACLibrary}
  1. write the test scenario in your user story
Add 1 and 1

Given my sick calculator
When I add 1 and 1
Then I expect the result to be 2

Now we Mock the functionality of our calculator because it doesn't actually exist.

  1. Add needed methods to the library like
(given) my sick calculator
(when) I add :anInt and :anotherInt
	result := anInt + anotherInt.
(then) I expect the result to be :anInteger
	self assert: anInteger equals: result.
  1. To test our new Story run the Test-Runner
ACTestRunner open
  1. Browse and edit created user stories and scenarios in the ACBrowser
ACBrowser open

alt text

Notes:

  1. All Libraries have to end with ACLibrary and all UserStories have to end with ACStory. Otherwise everything will work fine but you will not be able to commit your stories with Squot.

For further acceptance test examples check out our acceptit-Acceptance-Test package for tests testing acceptit.

Demovideo

Watch Demovideo here: https://youtu.be/BvTDBnQaMbs

Development and Progress

For an update on the project state and the progress we made check out our project documentation

Further documentation

For further project documentation and more details check out our wiki