Skip to content

Commit 54ac71d

Browse files
Muntasib-creatorsazidOytizzoSaqib-HaiderMuntasir00
authored
Node 16.1.0 release (#240)
* fetch only the test case json * Change endpoint to use versioning * Add deploy-v3 node side diagram * Update DeployInfo protobuf * Register node as online every time node reconnects * add local device exception * handle reconnection + take local run from remote config * Update deploy info proto def * adapt debug mode from debug info * refactor the payload data * Convert action seq check to int from str * Don't dump report.json file to Framework folder * Connect to live log service when node goes online * deploy: tc receive confirmation * deploy: send ack before running tc * blindly pick first local device for now * Disable SSL cert verification for deploy * Reset settings file * Add version + changelog * remove unnecessary file * [Add] initial codes for function eval in csv cells * Adding functionality for profile * Updating open_browser for profile integration * Add chrome_profile in Go_To_link * Update CHANGELOG.md * [remove] removed prints * Update with execlog and Darwin * Convert all timestamps timezone to UTC * Add changelog entry * convert browser opts to string before sending to logger * Fixed the Execlog with colored print * Remove duplicate code_generator file * [Fix] Fixed screenshot common action * [Fix] Windows pid issue on image-parent search solved * Allow raw data to be printed from exec log * Do not print connection attempts unless (see more) - Node launched fresh - Node disconnected because of network issue - Reconnect attempt failed more than 3 times * Update constructor param type * Set the encoding for all json files to utf-8 * Allow multiple certificate usage * Add changelog * Remove redundant code * Optimize file download by 1mb chunk * gh token * bug fixed as per arif vai suggestion * bug fixed * finalized message for fh token * Remove node_state.json * Modify protobuf * Load attachments in new format * Add code for attachment db and hash * Working attachment hash in node with db * skip 0 hash * Upload file to global attachment by replacing * Delete settings.conf * Add files via upload * Update common_functions.py * auto module update * removed extra print * Update settings.conf * Update settings.conf * Update settings.conf * Update settings.conf * Add changelog * Add gh_token debug config for vscode * Update common_functions.py * use concrete boolean * removed extra brackets * Changed the json location to Automationlog folder * Move to attachment db with unique file names * Redownload attachment on copy-failure + more reliable db entries * Temporarily disable attachment hashing * [Add] auth code generator action. windows only for now * [Add] changelogs * Use filename from server's attachment path * Launch into integrated debug console * Use the hash as the file name for storing in attachment db * Make sure attachments with same content works + refactor + Never copy the same file more than once for the same hash * Auto modules update (#202) * [Add] all 3 trusted host are added * [Add] = sign added * Dont print os.environ values * remove unused custom driver attachment code (needs review) * Don't print raw by default * . * Set browser console log encoding to utf-8 for international characters * add utf-8 encoding for windows logger * SID and service name is needed for database type oracle only * Converting db type to lowercase for handling case sensitivity * browser options print fix * CHANGELOG.md changed. * Adding get current url of browser action * Adding get oAuth2.0 access token url action * Adding rauth for oAuth2.0 operation * added remotewebdriver for chrome * docker compose file for running selenium grid * [Change] Disabling attachment hashing temporarily * run_time_params * remotewebdriver support for firefox and edge * added chrome version 102,103 * browser version options * checking remote server availability * Minor fixes (#207) * Dont print os.environ values * [Add] all 3 trusted host are added * Adding get current url of browser action * Adding get oAuth2.0 access token url action * experiment * Adding rauth for oAuth2.0 operation * [Fix] Compare bug fix * [Fix] Compare bug fix * [Fix] zeuz_auto_teardown bug fix * [Fix] mobile browser driver update bug fix * [Fix] undeclared result variable in go_to_link * [Fix] zeuz_pid_finder should be all lower * [Add] Changelogs Co-authored-by: Arifshariar7 <arifshariar7@gmail.com> * comment added * datetime format for windows * removed extra if * Performance testing (#188) * added builtinfunctions for performance testing * added perfomance module in sequential action * added actions for locust * removed type on builtinfunc * reverted back the unintentional changes * left right * standalone script for converting server json to locust json * logic changed for searching locust config in aciton * updated the filepath of sample json * formatted output json * read data from testcase json * function name updated, output path added * changed locust user 'user name' to 'name' * Refactor and update assign_locust_user * updated dataset reading logic * docs updated * username/classname to case-sensitive, user type to HttpUser and User * Move and update packages for perf * added optional parameter sequential and weight * username to user name and removed sequential from user * removed sequential from user * updated user with new format * added taskset action * reverted setting.conf * Add dir for storing generated locust files * Add the initial code for run_performance_test action * fixed the mentioned issues * Add functionality for generating locust python file * Bugfix * Remove duplicate line * Update generate_performance_testing action * Add and update run_performance_test * Executed the run_performance_test with subprocess * Update run, generate locust and add settings for keeping the track of paths * resolved subprocess issue and run_perf update * Save report to AutomationLog dir * Update settings.py for report dirs * Update path for html report * update and remove print_exc * Revert settings.conf * Add csv file generator and update the file name with run_id * refactor and remove redundant codes * Add documentation * Delete unused code from tests dir in Performance_Testing * Modify CHANGELOG and version, delete generated codes Co-authored-by: oytizzo <oytizzo@gmail.com> * added changelog for selenium_grid * updated string replacing * documentation added for oauth action * documentation added for new selenium action that saves the current url from browser's address bar * changelog updated * Download tc and step attachments into distinct folders + re-enable attachment db * Frame parameter support is online and working as intended, I have checked some test scnarios on TEST-3339 in qa server * Reverted refactored selenium code * Changelogs fix * [Remove] Restriction removed of the offset to be between 0-100. sometimes negative range is needed * [Add] Added wait global support in go_to_link action * [Remove] Restriction removed of the offset to be between 0-100. sometimes negative range is needed * [Add] Added wait global support in go_to_link action * [Change] Screenshot file name should contain the action title * fix remote host * [Add] Windows desired Element tree is printed * [Add] experimental raw codes for perf metrix * Global attachments (#212) * added global_attachments variable * global attachment auto download * download global attachment class * global attachment class * removed global attachment from variable parsing * added comment for global attachments * removed extra spaces * pathlib and custom log_dir * fix auto module upgrade (#215) * delete outdated_modules.json after upgrade * handle extra string * module version specify * [Add] Collect performance metrics for every driver_id in a testcase and save it to report * [Fix] Get_Current_URL action fix * [Fix] enable performance only when browser starts * [Fix] Browser options added inside exception block * UUID (#218) * [Add] Add uuid module in variable parsing * [Add] Changelog * [Fix] spelling correction global_attachments * [Add] access zeuz shared variables directly from execute_python_code * [Add] new zeuz variable `zeuz_attachments_dir` * [Add] import other python modules into execute_code * removed commit from select query * truncate extra strings from server address * db multi sessions * changelog added * removed uses of global var * [Add] browser_performance metrics * [Add] Step metrics, Action Metrics * changelogs * Pin websocket client library to 1.3.3 (1.4.0 contains breaking changes) * [Fix] init browser_perf = {} * [Add] Added `first-contentful-paint` value into browser_performance metrics by javascript * secondary random email factory * added exception * bs4 to read text from html email * delete mailbox * reverted order of factories * added changelog * [Fix] try-except added for first-contentful-paint metric * Advanced activity extract handling and deprecation fix * [Fix] Deprecation fix of selenium * [Add] 'safebrowsing.enabled': 'false' * initial_download_folder is connected to dynamic debug runid * [Add] data-store actions * [Fix] api-key fix in data-store * [Add] We handle click errors by default * [Add] limit prettifying characters with `zeuz_prettify_limit` * stale element requires relocating of element * [Add] Filepath handle in save_into_variable * [Add] prettify_limit = None * [Add] json.dumps(val,indent=2) in prettify_limit * Added line for zeuz failed - - replaced Element == "zeuz_failed" this line with the follwoing line -> type(Element) == str and Element == "zeuz_failed" Applied on all 12 places of windows action where it appeared. - Fixed Conditional action based on element finding . * Added -> if not(type(Element) == str and Element == "zeuz_failed"): for scroll to element * Add Largest Contentful Paint (LCP) metric for chromium browsers * [Temporary] Manual input when save attribute selenium fails * Added line for image search * if attribute_value = zeuz_failed: return * ws_ss_log var to turn off log_ss in debug * Fixed drag and drop zeuz failed issue * Fixed all value passing True issue for checkboxes and radio button on windows * Fixed button enabled or disabled state for windows * - Fix scroll to element for windows * Fixed action passing even if the element not found with scroll to element action. * Added * Added fix for check out - Fixed zeyz failed error - Fixed value returning true for uncheck value * Image comparison , create and edit screenshot actions are added. TaxCalc's QA's are asking for it. It is subject to change. * [Add] `continue to next iteration` added in for loop action * [Revert] taking input if save attribute fails * [Fix] If click fails dont download * [Fix] Remove execute_cdp_cmd for non-chromium browsers * [Fix] Deprecation fix * date modify fix (#233) * Read step continue point from local step data * [Fix] Zoom annotation fix for inspecting windows element * [Fix] cmd fix for binary windows app launch * version = 16.1.0 date = Oct 25, 2022 * changelog Co-authored-by: Mohammed Sazid Al Rashid <sazidozon@gmail.com> Co-authored-by: oytizzo <oytizzo@gmail.com> Co-authored-by: Saqib-Haider <saqibhaider567@gmail.com> Co-authored-by: Saqib Haider <73651567+Saqib-Haider@users.noreply.github.com> Co-authored-by: Muntasir00 <muntasir690000@gmail.com> Co-authored-by: Sunny <sunny1509006@gmail.com> Co-authored-by: Sakib <sakibkuet16@gmail.com> Co-authored-by: Raisa2773 <shin2016018@gmail.com> Co-authored-by: Arifshariar7 <arifshariar7@gmail.com> Co-authored-by: Sakib75 <skb09skb@gmail.com> Co-authored-by: Sakib75 <30881393+Sakib75@users.noreply.github.com> Co-authored-by: Sourav Raihan <mrh.sourav54@gmail.com> Co-authored-by: Mohammed Sazid-Al-Rashid <sazidz@outlook.com>
1 parent d313d26 commit 54ac71d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3949
-994
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pid.txt
1818
Framework/settings.conf
1919
AutomationLog/
2020
iosSimulator/*
21+
node_state.json
2122

2223
# Nodejs gitignore
2324
# Logs

.vscode/launch.json

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,43 @@
1515
"type": "python",
1616
"request": "launch",
1717
"program": "${file}",
18-
"console": "integratedTerminal"
18+
"console": "internalConsole",
19+
"internalConsoleOptions": "openOnSessionStart"
1920
},
2021
{
2122
"name": "Python: node_cli",
2223
"type": "python",
2324
"request": "launch",
2425
"program": "${workspaceFolder}/node_cli.py",
25-
"console": "integratedTerminal"
26+
"console": "internalConsole",
27+
"internalConsoleOptions": "openOnSessionStart"
2628
},
2729
{
2830
"name": "Python: node_cli custom log dir",
2931
"type": "python",
3032
"request": "launch",
3133
"program": "${workspaceFolder}/node_cli.py",
3234
"args": ["-d /home/szxo3/Desktop/test_node_dir"],
33-
"console": "integratedTerminal"
35+
"console": "internalConsole",
36+
"internalConsoleOptions": "openOnSessionStart"
3437
},
3538
{
36-
"name": "Python: node_gui",
39+
"name": "Python: local_run",
3740
"type": "python",
3841
"request": "launch",
39-
"program": "${workspaceFolder}/node_gui.py",
40-
"console": "integratedTerminal"
42+
"program": "${workspaceFolder}/node_cli.py",
43+
"args": ["--local_run"],
44+
"console": "internalConsole",
45+
"internalConsoleOptions": "openOnSessionStart"
4146
},
4247
{
43-
"name": "Python: local_run",
48+
"name": "Python: node_cli with GH_TOKEN",
4449
"type": "python",
4550
"request": "launch",
4651
"program": "${workspaceFolder}/node_cli.py",
47-
"args": ["--local_run"],
48-
"console": "integratedTerminal"
49-
}
52+
"args": ["--gh", "TOKEN_HERE"],
53+
"console": "internalConsole",
54+
"internalConsoleOptions": "openOnSessionStart"
55+
},
5056
]
5157
}

Apps/Authenticator/gauth

2.3 MB
Binary file not shown.

Apps/Authenticator/gauth.exe

2.49 MB
Binary file not shown.

Apps/Windows/ZeuZ_Windows_Inspector.py

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
from colorama import init as colorama_init
99
from colorama import Fore
1010

11+
#Importing rich library to print in an organized manner
12+
from rich import print
13+
from rich.text import Text
14+
from rich.tree import Tree
15+
1116
# Initialize colorama for the current platform
1217
colorama_init(autoreset=True)
1318

@@ -165,7 +170,6 @@ def _child_search2(ParentElement):
165170
if temp:
166171
return path + temp
167172
create_index(index_trace, each_child)
168-
169173
return path
170174

171175
except Exception:
@@ -531,10 +535,29 @@ def debugger_is_active() -> bool:
531535
except:
532536
No_of_level_to_skip = 0
533537

538+
def create_tag(elem):
539+
s = "<"
540+
for i in elem.attrib:
541+
s = s + i + '="' + elem.attrib[i] + '" '
542+
s = s[:-1] + ">"
543+
return s
544+
545+
546+
def printTree(root,tree):
547+
for child in root:
548+
if child.get('zeuz') == "aiplugin":
549+
tree.add(f"[bold green]{create_tag(child)}", guide_style="red")
550+
return
551+
elif child.findall(".//*[@zeuz='aiplugin']"):
552+
temp = tree.add(f"[yellow]{create_tag(child)}", guide_style="red")
553+
printTree(child, temp)
554+
else:
555+
tree.add(f"[white]{create_tag(child)}", guide_style="red")
556+
534557

535558
def main():
536559
try:
537-
global x, y, path_priority, element_plugin, auth, path, xml_str, findall_time, findall_count
560+
global x, y, path_priority, element_plugin, auth, path, xml_str, findall_time, findall_count, list_path
538561
auth_thread = Authenticate()
539562
while True:
540563
if debugger_is_active():
@@ -553,9 +576,14 @@ def main():
553576
if windows.Count == 0:
554577
return
555578
for window in windows:
579+
if window.Current.Name.strip() in ("Annotation - Zoom"): continue
556580
if _found(window):
557581
window_name = window.Current.Name
558-
xml_str += '<body Window="%s">' % window_name
582+
try:
583+
pid = window.Current.ProcessId
584+
except:
585+
pid = ""
586+
xml_str += '<body Window="%s" pid="%s">' % (window_name, pid)
559587
path = create_path({}, window, True)
560588
break
561589
else:
@@ -566,8 +594,9 @@ def main():
566594

567595
xml_str = xml_str.encode('ascii', 'ignore').decode() # ignore characters which are not ascii presentable
568596

569-
print("************* Exact Path *************")
597+
print("======== COPY Exact Path ========")
570598
print(path)
599+
print("============= COPY ==============")
571600
# print("************* path_priority *************")
572601
# print("Path priority =", path_priority, "\n\n")
573602
with open("Element.xml", "w") as f:
@@ -578,6 +607,7 @@ def main():
578607
except: pass
579608
sibling = pyautogui.confirm('Do you want SIBLING?')
580609
root = ET.fromstring(xml_str)
610+
tree = Tree(f"[cyan]{create_tag(root)}", guide_style="red") # root of rich tree python
581611
if sibling.strip().lower() == "ok":
582612
print("Hover over the SIBLING and press control")
583613
keyboard.wait("ctrl")
@@ -589,19 +619,21 @@ def main():
589619
Remove_coordinate(root)
590620
Remove_coordinate_time = round(time.perf_counter() - start, 3)
591621
xml_str = ET.tostring(root).decode()
622+
printTree(root, tree)
623+
print(tree)
592624
with open("Sibling.xml", "w") as f:
593625
f.write(xml_str)
594626

595627
start = time.perf_counter()
596628
Upload(auth_thread, window_name)
597629
Upload_time = round(time.perf_counter()-start, 3)
598630

599-
print("\nElement searching time =", element_time, "sec")
600-
print("Sibling searching time =", sibling_time, "sec")
601-
print("Coordinate remove time =", Remove_coordinate_time, "sec")
602-
print("Uploading to API time =", Upload_time, "sec")
603-
print("start_findall time =", round(findall_time, 3), "sec", "Findall count =", findall_count)
604-
print("each__findall_time (Each_Element_find_time, finall_time, child_count)")
631+
# print("\nElement searching time =", element_time, "sec")
632+
# print("Sibling searching time =", sibling_time, "sec")
633+
# print("Coordinate remove time =", Remove_coordinate_time, "sec")
634+
# print("Uploading to API time =", Upload_time, "sec")
635+
# print("start_findall time =", round(findall_time, 3), "sec", "Findall count =", findall_count)
636+
# print("each__findall_time (Each_Element_find_time, finall_time, child_count)")
605637
from operator import itemgetter
606638
global each_findall_time
607639
each_findall_time = sorted(each_findall_time, key=itemgetter(0), reverse=True)
@@ -617,4 +649,4 @@ def main():
617649

618650

619651
if __name__ == "__main__":
620-
main()
652+
main()

CHANGELOG.md

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,78 @@
11
# Changelog
22

3-
# Version 15
3+
4+
# Version 16
45

56
### [Current changes]
6-
- _
7+
-
8+
### [16.1.0][Oct 25, 2022]
9+
- **[Add]** Continue to next iter feature is implemented in For Loop Action
10+
- **[Fix]** datatype fix and checkbox/toggle item fix for windows
11+
- **[Fix]** browser performance matrices is confined to chrome and edge browsers only
12+
- **[Add]** Largest Contentful Paint is added in browser performance matrices
13+
- **[Improve]** Stale element error is handled in click and check action
14+
- **[Add]** `zeuz_prettify_limit` variable can limit prettify characters
15+
- **[Add]** Added secondary random mailbox
16+
- **[Add]** Added Browser Performance metrics, Step metrics, Action metrics
17+
- **[Add]** Import files in Execute Python Code action
18+
- **[Add]** Added a reserved variable `zeuz_attachments_dir`
19+
- **[Add]** Enabling connection for two of more database simultaneously
20+
- **[Add]** 'uuid' module is inserted into variable parsing
21+
- **[Add]** 'frame parameter' support is added into Switch_Iframe action
22+
- **[Add]** Action for get access token url (oauth 2.0) with documentation
23+
- **[Add]** Browser action for get current url from address bar with documentation
24+
- **[Add]** Basic performance testing functions for rest calls
25+
- **[Add]** Added selenium grid functionality. Usage:
26+
```shell
27+
cd .../Framework/Built_In_Automation/Web/Selenium
28+
docker-compose -f docker-compose-v3.yml up
29+
```
30+
- **[Fix]** Compare data *ignore_list_order* bug fix
31+
- **[Fix]** Zeuz_auto_teardown variable bug fix
32+
- **[Fix]** Mobile browser update bug fix
33+
- **[Fix]** zeuz_pid_finder bug fix for chrome
34+
- **[Add]** Authenticator code generator action is added for windows
35+
- **[Improve]** Function handle capability inside csv cells is implemented
36+
- **[Fix]** Windows_pid issue solved for image searching
37+
- **[Add]** Don't download the same attachments multiple times. This is achieved
38+
by keeping track of hashes of the attachment files sent from the server.
39+
40+
Technical note: protobuf definitions updated.
41+
42+
- **[Add]** Add support for multiple certificates in API actions. Use them like
43+
so:
44+
45+
- cert | optional parameter | filename.pem
46+
- cert | optional parameter | filename.cert, filename.key
47+
48+
Certificates are best used by pairing with the `session` optional parameter.
49+
50+
- **[Fix]** Fixed return for common screenshot action
51+
### [16.0.0]
52+
- **[Change]** Change the deploy system. This change replaces the old deploy
53+
system code with a new one that is compatible with the v3 engine on the server
54+
side. This works by connecting with a persistent websocket connection that is
55+
forcefully disconnected every 30 seconds from the server side. This makes sure
56+
that we don't have long persistent but unstable connections. There are also
57+
other mechanisms in place to make sure we always receive test cases in proper
58+
order. If for some reason, node's connection breaks when test cases are
59+
in-flight (being sent from server to node), they'll be automatically restored
60+
back to the run id so that node can run the same test case even though the
61+
connection got disrupted. Run cancellations work properly. In deploy API you
62+
can also specify preferred nodes so that some test cases are always run in
63+
those preferred nodes.
64+
- **[Fix]** Convert all timestamps into UTC timezone to match server timezone.
65+
This fixes all runid related time issues like showing a negative date and time
66+
difference.
67+
- **[Fix]** SID and service name is required for Oracle database only.
68+
Previously error was showing when user didn't input SID and service name for
69+
other database(for example MySQL etc.). Now this has been fixed.
70+
71+
# Version 15
72+
### [15.2.0][Jun 07, 2022]
73+
- **[Add]** Add profile functionality for Chrome
74+
- **[Add]** Add extension functionality for Chrome
75+
- **[Improve]** Chrome browser options and arguments
776

877
### [15.1.1][Jun 07, 2022]
978
- **[Add]** Upload window is automated with pyautogui for MAC
@@ -13,6 +82,7 @@
1382
- **[Add]** Added swipe by uiautomator action for android
1483
- **[Add]** Added uiautomatorviewer.bat inside App directory
1584

85+
1686
### [15.0.4][May 11, 2022]
1787
- **[Improve]** Added plus button support in keystroke action
1888

0 commit comments

Comments
 (0)