Skip to content

Commit a817727

Browse files
author
Chris McCue
committed
api test framework examples.
0 parents commit a817727

File tree

13 files changed

+798
-0
lines changed

13 files changed

+798
-0
lines changed

api_test_framework_example/__init__.py

Whitespace-only changes.

api_test_framework_example/features/__init__.py

Whitespace-only changes.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
*** Settings ***
2+
Library ../page_objects/fc_lpn/fc_lpn_objects.py
3+
4+
*** Test Cases ***
5+
6+
7+
8+
19-fc_lpn_getSiblingList_invalid_lpn
9+
[Tags] lpn
10+
[Documentation]
11+
... Calls the API to return the siblings of the LPN passed in. Expected result
12+
... is the API returns a code 500 error since the LPN is invalid with the message LPN X
13+
... is not valid where X is the LPN passed up
14+
fc lpn getSiblingList invalid lpn
15+
16+
20-fc_lpn_getSiblingList_valid_lpn
17+
[Tags] lpn
18+
[Documentation]
19+
... Calls the API to return the siblings of the LPN passed in. Expected result
20+
... is the API returns the six LPNs before and the six LPNs after the one that was passed up.
21+
... It returns the case tied to each LPN, the po tied to the case, and the current location
22+
... of the LPN. NOTE - These wouldnt necessarily be populated.
23+
fc lpn getSiblingList valid lpn
24+
25+
21-fc_lpn_get_valid_lpn
26+
[Tags] lpn
27+
[Documentation] Calls the API to return the entire history of an LPN. Expected result is the
28+
... API returns the history of an LPN
29+
fc lpn get valid lpn
30+
31+
32+
22-fc_lpn_get_invalid_lpn
33+
[Tags] lpn
34+
[Documentation] Calls the API to return the entire history of an LPN. Expected result is the
35+
... API throw the error X was not found where X is the LPN that was passed up
36+
fc lpn get invalid lpn
37+
38+
39+
40+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
*** Settings ***
2+
Library ../page_objects/fc_tools/fc_tools_objects.py
3+
4+
5+
*** Test Cases ***
6+
7+
1-fc.tools.getiWMSVersion
8+
[Tags] api
9+
[Documentation] Compares the version of WMS running on users device to the version set on the server
10+
fc tools check for latest WMS version on server
11+

api_test_framework_example/page_objects/__init__.py

Whitespace-only changes.

api_test_framework_example/page_objects/core_functions.py

Lines changed: 587 additions & 0 deletions
Large diffs are not rendered by default.

api_test_framework_example/page_objects/fc_lpn/__init__.py

Whitespace-only changes.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from wms.page_objects.core_functions import core_functions
2+
3+
from wms.payloads.fc_lpn_payloads import *
4+
5+
6+
7+
8+
class fc_lpn_objects(core_functions):
9+
'''
10+
classdocs
11+
'''
12+
13+
def fc_lpn_getSiblingList_invalid_lpn(self):
14+
self.check_payload_contains_values(payload=fc_lpn_pl_getSiblingList_invalid, main_keys=['error'],
15+
key_value_dict=[{"code": 500, "data": None}])
16+
17+
def fc_lpn_getSiblingList_valid_lpn(self):
18+
self.check_payload_contains_values(payload=fc_lpn_pl_getSiblingList_valid, main_keys=['result', 'lpnData'],
19+
key_value_dict=[{"administratorID": 00}])
20+
21+
def fc_lpn_get_valid_lpn(self):
22+
self.check_payload_contains_values(payload=fc_lpn_pl_get_valid, main_keys=['result', 'data'],
23+
key_value_dict=[{"action": "Shipment"}])
24+
25+
def fc_lpn_get_invalid_lpn(self):
26+
self.check_payload_contains_values(payload=fc_lpn_pl_get_invalid, main_keys=['error'],
27+
key_value_dict=[{"code": 500, "message": "Lpn was not found", "data": None}])
28+
29+

api_test_framework_example/page_objects/fc_tools/__init__.py

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from wms.page_objects.core_functions import core_functions
2+
from wms.payloads.fc_tools_payloads import *
3+
4+
5+
class fc_tools_objects(core_functions):
6+
7+
def fc_tools_check_for_latest_WMS_version_on_server(self):
8+
self.check_payload_contains_values_regex(payload=fc_tools_pl_getiWMSVersion, main_keys=['result'], key_value_dict=[{'wmsVersion': '2.3.'}])

0 commit comments

Comments
 (0)