Branch | Travis CI | |
---|---|---|
master | ||
develop |
Make sure you have metacello-work installed in your image.
Follow the following Guide for the git repo setup If you follow the guide there is no need for Step 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
Choose a class to test like for example "MySickCalculator".
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'
Create a library like this:
ACLibrary subclass: #MySickACLibrary
instanceVariableNames: 'result'
classVariableNames: ''
poolDictionaries: ''
category: 'Sick-Calculator-Tests'
Add a libraries
method on class side to your user story class and make it return the class of it's library
libraries
^{MySickACLibrary}
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.
6. Add needed methods to the library like
```smalltalk
(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.
To test our new Story run the Test-Runner
ACTestRunner open
Browse and edit created user stories and scenarios in the ACBrowser
ACBrowser open
Notes:
For further acceptance test examples check out our acceptit-Acceptance-Test package for tests testing acceptit.
For an update on the project state and the progress we made check out our project documentation
For further project documentation and more details check out our wiki