Serenity BDD Trader Demo App
Home > Requirements > Portfolios > Buying and selling shares
Report generated 15-08-2024 19:49

Feature: Buying and selling shares

In order to make my investments grow
As a trader
I want to be able to buy and sell shares to make a profit

All traders start with $1000 in cash in their portfolio
CASH amounts are recorded in cents, so 50000 represents $500

Key capabilities include the ability to buy and sell shares, e.g.

Given Tom Smith is a registered trader
When he purchases 5 AAPL shares at $100 each
And he sells 3 AAPL shares for $150 each
Then he should have the following positions:

securityCodeamount
CASH95000
AAPL2

{result:Buying and selling shares!Buying and selling shares}
More details

Scenarios

Given Tom Smith is a registered trader

When he purchases 5 AAPL shares at $100 each

And he sells 3 AAPL shares for $150 each

Then he should have the following positions:

securityCodeamount
CASH95000
AAPL2

Given Tom Smith is a registered trader

When he purchases 5 AAPL shares at $100 each

Then he should have the following positions:

securityCodeamount
CASH50000
AAPL5

Feature Coverage By Scenario

Test Outcomes

Test Performance

Key Statistics

Number of Scenarios 2 Total Duration 3s
Total Number of Test Cases 2 Fastest Test 313ms
Number of Manual Test Cases 0 Slowest Test 3s
Tests Started Aug 15, 2024 19:49:39 Average Execution Time 2s
Tests Finished Aug 15, 2024 19:49:43 Total Execution Time 4s

Automated Tests

feature Scenario Context Steps Started Total Duration Result
Buying and selling shares Buying and selling shares 4 19:49:39 3s 829ms SUCCESS
Buying and selling shares Buying shares 3 19:49:42 313ms SUCCESS

Manual Tests

No manual tests were recorded
Serenity BDD version 4.1.20