Revision: 4254
Author: jussi.ao.malinen
Date: Sun Oct 17 13:25:12 2010
Log: trying better code formatting
http://code.google.com/p/robotframework/source/detail?r=4254
Modified:
/wiki/HowToWriteGoodTestCasesWithExamples.wiki
=======================================
--- /wiki/HowToWriteGoodTestCasesWithExamples.wiki Sun Oct 17 13:19:13 2010
+++ /wiki/HowToWriteGoodTestCasesWithExamples.wiki Sun Oct 17 13:25:12 2010
@@ -23,7 +23,7 @@
<table>
<tr><th>InvalidLoginShouldFail.txt</th><th>InvalidLoginShouldFail.txt</th></tr>
<tr><td>
-<pre>
+{{{
*** Test Cases ***
Login With Empty Password Should Fail
Login With Empty Username Should Fail
@@ -31,10 +31,10 @@
Login With Invalid Username Should Fail
Login With Invalid Password Should Fail
Login With Invalid Username And Invalid Password Should Fail
-</pre>
+}}}
</td>
<td>
-<pre>
+{{{
*** Test Cases ***
Empty Password
Empty Username
@@ -42,7 +42,7 @@
Invalid Username
Invalid Password
Invalid Username And Invalid Password
-</pre>
+}}}
</td></tr>
</table>
@@ -56,7 +56,7 @@
<tr><td>
{{{
*** Keywords ***
-Input Valid Username and Valid Password And Click Login Button
+Input Valid Username And Valid Password And Click Login Button
}}}
</td>
<td>
@@ -80,7 +80,7 @@
<tr><td>
{{{
*** Settings ***
-Test Setup Login to system, add user, activate alarms and check balance
+Test Setup Login To System, Add User, Activate Alarms And Check Balance
}}}
</td>
<td>
@@ -110,7 +110,7 @@
<tr><td>
{{{
*** Settings ***
-Documentation Checks that invalid login fails
+Documentation Checks That Invalid Login Fails
}}}
</td>
<td>
@@ -134,13 +134,13 @@
{{{
*** Test Cases ***
Valid Login
- [Documentation] Opens a browser to login url, inputs username
+ [Documentation] opens a browser to login url, inputs username
... and password and checks the welcome page is open
- Open browser ${LOGIN URL} ${BROWSER}
- Input text u_field ${VALID USERNAME}
- Input text p_field ${VALID PASSWORD}
+ Open Browser ${LOGIN URL} ${BROWSER}
+ Input Text u_field ${VALID USERNAME}
+ Input Text p_field ${VALID PASSWORD}
Click Button button_sbm
- Title should be Welcome Page
+ Title Should Be Welcome Page
[Teardown] Close Browser
}}}
</td>
@@ -148,11 +148,11 @@
{{{
*** Test Cases ***
Valid Login
- Open login page
- Input username ${VALID USERNAME}
- Input password ${VALID PASSWORD}
+ Open Login Page
+ Input Username ${VALID USERNAME}
+ Input Password ${VALID PASSWORD}
Submit Credentials
- Welcome page should be open
+ Welcome Page Should Be Open
[Teardown] Close Browser
}}}
</td></tr>
@@ -227,20 +227,20 @@
{{{
*** Test Cases *** USERNAME PASSWORD
-Invalid username invalid ${VALID PASSWORD}
-Invalid password ${VALID USERNAME} invalid
-Invalid both invalid invalid
-Empty username ${EMPTY} ${VALID PASSWORD}
-Empty password ${VALID USERNAME} ${EMPTY}
-Empty both ${EMPTY} ${EMPTY}
+Invalid Username invalid ${VALID PASSWORD}
+Invalid Password ${VALID USERNAME} invalid
+Invalid Both invalid invalid
+Empty Username ${EMPTY} ${VALID PASSWORD}
+Empty Password ${VALID USERNAME} ${EMPTY}
+Empty Both ${EMPTY} ${EMPTY}
*** Keywords ***
Invalid Login
[Arguments] ${username} ${password}
- Input username ${username}
- Input password ${password}
+ Input Username ${username}
+ Input Password ${password}
Submit Credentials
- Error page should be open
+ Error Page Should Be Open
}}}
= User keywords =
@@ -297,36 +297,36 @@
<tr><td>
{{{
*** Test Cases ***
-Withdraw from account
- ${status} = Withdraw from account 50$
- Withdraw should have succeeded ${status}
+Withdraw From Account
+ ${status} = Withdraw From Account 50$
+ Withdraw Should Have Succeeded ${status}
*** Keywords ***
-Withdraw from account
+Withdraw From Account
[arguments] ${amount}
- ${status} = Withdraw from user account ${USER} ${amount}
+ ${status} = Withdraw From User Account ${USER} ${amount}
[return] ${status}
-Withdraw should have succeeded
+Withdraw Should Have Succeeded
[arguments] ${status}
- Should be equal ${status} SUCCESS
+ Should Be Equal ${status} SUCCESS
}}}
</td>
<td>
{{{
*** Test Cases ***
-Withdraw from account
- Withdraw from account 50$
- Withdraw should have succeeded
+Withdraw From Account
+ Withdraw From Account 50$
+ Withdraw Should Have Succeeded
*** Keywords ***
-Withdraw from account
+Withdraw From Account
[arguments] ${amount}
- ${status} = Withdraw from user account ${USER} ${amount}
+ ${status} = Withdraw From User Account ${USER} ${amount}
Set Test Variable ${status}
-Withdraw should have succeeded
- Should be equal ${status} SUCCESS
+Withdraw Should Have Succeeded
+ Should Be Equal ${status} SUCCESS
}}}
</td></tr>
</table>