1
+ *** Settings ***
2
+ Library String
3
+ Library BuiltIn
4
+ Documentation In this suite we are using various BuiltIn keywords and String keywords.
5
+ ... Convert To Lower Case is String keyword which converts string to lower case.
6
+ ... log to console is BuiltIn keyword it Logs the given message to the console.
7
+ ... Convert to Upper Case is String keyword which converts string to upper case.
8
+ ... Should Be Uppercase is String keyword it fails if the given string is not in uppercase.
9
+ ... Should Be Lowercase is string keyword it fails if the given string is not in lowercase.
10
+ ... Length Should Be is BuiltIn keyword it verifies that the length of the given item is correct.
11
+ ... Should Be Equal is BuiltIn keyword it fails if the given objects are unequal.
12
+ ... Should Not Be Equal is BuiltIn keywordit it fails if the given objects are equal.
13
+ ... Should Be Equal As Integers is BuiltIn keyword it fails if objects are unequal after converting them to integers.
14
+ ... Should Be Equal As Strings is BuiltIn keyword it fails if objects are unequal after converting them to strings.
15
+ ... Should Contain is BuiltIn keyword it fails if container does not contain item one or more times.
16
+ ... Should Not Contain is BuiltIn keyword it fails if container contains item one or more times.
17
+ ... Should Contain X Times is Builtin keyword it fails if container does not contain item count times.
18
+ ... Should End With is BuiltIn keyword it fails if the string str1 does not end with the string str2.
19
+ ... Should Not End With is BuiltIn keyword it fails if the string str1 ends with the string str2.
20
+ ... Should Start With is BuiltIn keyword it fails if the string str1 does not start with the string str2.
21
+ ... Should Not Start With is BuiltIn keyword it fails if the string str1 starts with the string str2.
22
+ ... Should Be Empty is BuiltIn keyword it verifies that the given item is empty.
23
+ ... Should Not Be Empty is BuiltIn keyword it verifies that the given item is not empty.
24
+ ... Should be true is BuiltIn keyword it fails if the given condition is not true.
25
+ ... Should Not be true BuiltIn keyword it fails if the given condition is true.
26
+ ... String String is String keyword it remove leading and/or trailing whitespaces from the given string.
27
+
28
+ *** Variables ***
29
+ ${upperCase } ABCDEFGHIJKLMNOPQRSTUVWXYZ
30
+ ${blank }
31
+ ${Line } This is new line
32
+
33
+ *** Test Cases ***
34
+ Testcase1
35
+ ${a } = Convert To Lower Case ${upperCase }
36
+ log to console ${a }
37
+ ${b } = Convert To Upper Case ${a }
38
+ log to console ${b }
39
+ Should Be Uppercase ${b }
40
+ Should Be Lowercase ${a }
41
+
42
+ Testcase2
43
+ ${count } = Get Length ${upperCase }
44
+ log to console ${count }
45
+ Length Should Be ${upperCase } 26
46
+ Should Be Equal ${upperCase } ABCDEFGHIJKLMNOPQRSTUVWXYZ
47
+ Should Be Equal ${upperCase } abcdefghijklmnopqrstuvwxyz ignore_case=true
48
+ Should Not Be Equal ${upperCase } abcdefghijklmnopqrstuvwxyz
49
+ Should Be Equal As Integers ${count } 26
50
+ Should Be Equal As Strings ${count } 26
51
+ Should Contain ${upperCase } ABCDEF
52
+ Should Not Contain ${upperCase } abcDEF
53
+ Should Contain X Times ${Line } line 1
54
+ Should Contain X Times ${Line } LINE 0
55
+ Should Contain X Times ${Line } e 2
56
+ Should End With ${Line } line
57
+ Should End With ${upperCase } XYZ
58
+ Should Not End With ${upperCase } xyz
59
+ Should Start With ${upperCase } ABCD
60
+ Should Start With ${upperCase } abcd ignore_case=true
61
+ Should Not Start With ${upperCase } abcd
62
+ Should Be Empty ${blank }
63
+ Should Not Be Empty ${upperCase }
64
+ Should be true 30>${count } >2
65
+ Should Not be true ${count } ==2
66
+ ${val } = Strip String ${Line } characters=line
67
+ log to console ${val }
68
+ ${val } = Strip String ${Line } characters=This
69
+ log to console ${val }
0 commit comments