From 8a1fc47af2097743fc8b1f0dfa4a03124d38ff69 Mon Sep 17 00:00:00 2001 From: rishagg01 <149525835+rishagg01@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:28:45 -0500 Subject: [PATCH] Selenium Test Release 2 Changes (#499) * seltest rel2 final2 * added test case for policy changes dashboard * typo changes on policy changes dashboard * updates on failed api & sel tests * Update cluster.yml * test changes to pass cicd * Update cluster.yml --- .../tests/api_tests/cluster/test_server.py | 4 +- .../tests/api_tests/linux_only/test_server.py | 3 +- ...st_computer_software_overview_dashboard.py | 22 ++--- .../cluster/test_credentials_access_logs.py | 59 ++++++++++++ .../cluster/test_health_check_dashboard.py | 21 +++-- .../test_identity_access_management.py | 49 ++++++++++ .../test_policy_changes_system_activity.py | 81 +++++++++++++++++ .../test_privileged_activity_log_dashboard.py | 56 ++++++++++++ .../test_process_explorer_dashboard.py | 22 ++--- .../test_security_dashboard_security_log.py | 50 +++++------ .../cluster/test_sysmon_summary_dashboard.py | 22 +++-- .../cluster/test_user_h_r_dashboard.py | 27 +++--- .../cluster/test_user_security_dashboard.py | 89 +++++++++---------- .../linux_only/test_basic_loading.py | 6 +- ...computer_software_overview_dashboard_lo.py | 15 ++-- .../test_health_check_dashboard_lo.py | 8 +- ...test_security_dashboard_security_log_lo.py | 30 ++++--- .../test_sysmon_summary_dashboard_lo.py | 17 ++-- .../linux_only/test_user_h_r_dashboard_lo.py | 30 ++++--- .../test_user_security_dashboard_lo.py | 41 ++++----- 20 files changed, 448 insertions(+), 204 deletions(-) create mode 100644 testing/tests/selenium_tests/cluster/test_credentials_access_logs.py create mode 100644 testing/tests/selenium_tests/cluster/test_identity_access_management.py create mode 100644 testing/tests/selenium_tests/cluster/test_policy_changes_system_activity.py create mode 100644 testing/tests/selenium_tests/cluster/test_privileged_activity_log_dashboard.py diff --git a/testing/tests/api_tests/cluster/test_server.py b/testing/tests/api_tests/cluster/test_server.py index b513ee7f..11a3ae78 100644 --- a/testing/tests/api_tests/cluster/test_server.py +++ b/testing/tests/api_tests/cluster/test_server.py @@ -43,11 +43,11 @@ def test_host_search(es_host, es_port, username, password): for key in data: rootKey = key + assert (data[rootKey]["total"]["value"] > 0) assert ".ds-metrics-system.cpu-default" in data[rootKey]["hits"][0]["_index"] assert (data[rootKey]["hits"][0]["_source"]["agent"]["name"] == "ubuntu-vm") - assert (data[rootKey]["hits"][0]["_source"]["agent"]["version"] == "8.15.3") - assert (data[rootKey]["hits"][0]["_source"]["cloud"]["instance"]["name"] == "ubuntu") + assert (data[rootKey]["hits"][0]["_source"]["agent"]["version"] == "8.15.3") assert (data[rootKey]["hits"][0]["_source"]["data_stream"]["dataset"] == "system.cpu") assert (data[rootKey]["hits"][0]["_source"]["ecs"]["version"] == "8.0.0") assert (data[rootKey]["hits"][0]["_source"]["elastic_agent"]["version"] == "8.15.3") diff --git a/testing/tests/api_tests/linux_only/test_server.py b/testing/tests/api_tests/linux_only/test_server.py index 98eaf571..d0af96db 100644 --- a/testing/tests/api_tests/linux_only/test_server.py +++ b/testing/tests/api_tests/linux_only/test_server.py @@ -49,7 +49,8 @@ def test_elastic_root(es_host, es_port, username, password): ), f"Expected 'docker', got {body['version']['build_type']}" assert ( body["version"]["lucene_version"] == "9.11.1" - ), f"Expected '9.9.2', got {body['version']['lucene_version']}" + ), f"Expected '9.11.1', got {body['version']['lucene_version']}" + assert ( body["version"]["minimum_wire_compatibility_version"] == "7.17.0" ), f"Expected '7.17.0', got {body['version']['minimum_wire_compatibility_version']}" diff --git a/testing/tests/selenium_tests/cluster/test_computer_software_overview_dashboard.py b/testing/tests/selenium_tests/cluster/test_computer_software_overview_dashboard.py index 507e07e7..1cbce108 100644 --- a/testing/tests/selenium_tests/cluster/test_computer_software_overview_dashboard.py +++ b/testing/tests/selenium_tests/cluster/test_computer_software_overview_dashboard.py @@ -7,36 +7,38 @@ from .lib import dashboard_test_function class TestComputerSoftwareOverviewDashboard: - dashboard_id = "33f0d3b0-8b8a-11ea-b1c6-a5bf39283f12" - + #dashboard_id = "33f0d3b0-8b8a-11ea-b1c6-a5bf39283f12" + #dashboard_id = "new dashboard" + dashboard_id = "ce98c19b-587f-4d76-9c49-2e9acee257d5" + @pytest.fixture(scope="class") def setup_login(self, driver, login): login() yield driver - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_application_crashing_and_hanging(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Application Crashing and Hanging", ".echChart",".xyChart__empty") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_application_crashing_and_hanging_count(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Application Crashing and Hanging Count", ".tbvChart",".visError") - @pytest.mark.skip(reason="Skipping this test") + #@pytest.mark.skip(reason="Skipping this test") def test_create_remote_threat_events(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "CreateRemoteThread events", ".tbvChart",".visError") + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "CreateRemoteThread events", ".euiFlexGroup",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_filter_hosts(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Filter Hosts", ".tbvChart",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_processes(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Processes", ".tbvChart",".visError") - + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Processes", ".euiDataGrid__focusWrap",".euiText") + diff --git a/testing/tests/selenium_tests/cluster/test_credentials_access_logs.py b/testing/tests/selenium_tests/cluster/test_credentials_access_logs.py new file mode 100644 index 00000000..903ddf90 --- /dev/null +++ b/testing/tests/selenium_tests/cluster/test_credentials_access_logs.py @@ -0,0 +1,59 @@ +import pytest +from selenium.webdriver.support.ui import WebDriverWait +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.common.by import By +from selenium.common.exceptions import NoSuchElementException + +from .lib import dashboard_test_function +class TestCredentialsAccessLogsDashboard: + dashboard_id = "e4d7b207-99aa-4410-8a2e-03487222bda1" + + @pytest.fixture(scope="class") + def setup_login(self, driver, login): + login() + yield driver + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_audit_logons(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Audit logons", ".echChart",".euiText") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_kerberos_ticket_failed_attempts(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Kerberos ticket - Failed attempts", ".expExpressionRenderer",".xyChart__empty") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_special_logon_attempts(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Special logon-attempts", ".echChart",".dummyval") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_account_lockout_attempts(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Account lockout -attempts", ".euiDataGrid",".euiSpacer") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_other_logon_logoff_disconnection_attempts(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Other logon /logoff-Disconnection attempts", ".expExpressionRenderer",".euiSpacer") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_kerberos_auth_request(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Kerberos auth request", ".echChart",".euiText") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_logon_attempts_by_host(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Logon attempts by hosts", ".echChart",".euiText") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_credential_validation_attempts(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Credential validation- attempts", ".echChart",".euiText") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_logon_using_explicit_credential_attempts(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Logon-using explicit credential attempts", ".echChart",".euiText") \ No newline at end of file diff --git a/testing/tests/selenium_tests/cluster/test_health_check_dashboard.py b/testing/tests/selenium_tests/cluster/test_health_check_dashboard.py index 34414e34..d520c9b8 100644 --- a/testing/tests/selenium_tests/cluster/test_health_check_dashboard.py +++ b/testing/tests/selenium_tests/cluster/test_health_check_dashboard.py @@ -7,14 +7,15 @@ from .lib import dashboard_test_function class TestHealthCheckDashboard: - dashboard_id = "51fe1470-fa59-11e9-bf25-8f92ffa3e3ec" - + #dashboard_id = "51fe1470-fa59-11e9-bf25-8f92ffa3e3ec" + dashboard_id = "fff78bfe-2758-4fa1-939f-362380fc607d" + @pytest.fixture(scope="class") def setup_login(self, driver, login): login() yield driver - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_number_of_admins(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Number of Admins", ".expExpressionRenderer",".dummyval") @@ -23,24 +24,22 @@ def test_number_of_admins(self, setup_login, kibana_url, timeout): # If there is no visualization rendered or "No Results found" message is displayed for this panel on dashboard, this test should fail which is correct behavior - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_total_hosts(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Total Hosts", ".visualization",".dummyval") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_events_by_machine(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Events by machine", ".echChart",".euiText") - @pytest.mark.skip(reason="Skipping this test") + #@pytest.mark.skip(reason="Skipping this test") def test_unexpected_shutdowns(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Unexpected shutdowns", ".echChart",".visError") + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Unexpected shutdowns", ".tbvChart",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_users_seen(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Users seen", ".visualization",".dummyval") - - + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Users seen", ".visualization",".dummyval") \ No newline at end of file diff --git a/testing/tests/selenium_tests/cluster/test_identity_access_management.py b/testing/tests/selenium_tests/cluster/test_identity_access_management.py new file mode 100644 index 00000000..0ae46abc --- /dev/null +++ b/testing/tests/selenium_tests/cluster/test_identity_access_management.py @@ -0,0 +1,49 @@ +import pytest +from selenium.webdriver.support.ui import WebDriverWait +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.common.by import By +from selenium.common.exceptions import NoSuchElementException +from .lib import dashboard_test_function + +class TestCredentialsAccessLogsDashboard: + dashboard_id = "32ed7a33-b22e-4c4b-b4bd-a55c2cf4c0d0" + + @pytest.fixture(scope="class") + def setup_login(self, driver, login): + login() + yield driver + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_registry_object_access(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Registry Object Access", ".echChart",".dummyval") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_updated_scheduler_jobs(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Updated Scheduler Jobs", ".visualization",".dummyval") + + @pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_new_scheduler_jobs(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "New Scheduler Jobs", ".visualization",".dummyval") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_password_resets_changes(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Password Resets and Changes", ".echChart",".euiDataGrid__noResults") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_user_lockouts(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "User Lockouts", ".echChart",".euiDataGrid__noResults") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_password_hash_access(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Password Hash Access", ".echChart",".euiDataGrid__noResults") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_changes_to_default_domain_policy(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Changes to Default Domain Policy", ".euiFlexGroup",".euiDataGrid__noResults") \ No newline at end of file diff --git a/testing/tests/selenium_tests/cluster/test_policy_changes_system_activity.py b/testing/tests/selenium_tests/cluster/test_policy_changes_system_activity.py new file mode 100644 index 00000000..fe9859cd --- /dev/null +++ b/testing/tests/selenium_tests/cluster/test_policy_changes_system_activity.py @@ -0,0 +1,81 @@ +import pytest +import os +from selenium.webdriver.support.ui import WebDriverWait +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.common.by import By +from selenium.common.exceptions import NoSuchElementException +from .lib import dashboard_test_function + +class TestPolicyChangesSystemActivityDashboard: + + dashboard_id = "614a8392-17b5-49c4-9397-bc3cac526c61" + + @pytest.fixture(scope="class") + def setup_login(self, driver, login): + login() + yield driver + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_rpc_connection_attempts(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "RPC Connection Attempts", ".expExpressionRenderer",".dummyval") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_exception_firewall_rules(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Added or Updated Exception Firewall Rules", ".expExpressionRenderer",".dummyval") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_rpc_connections(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "RPC Connections", ".echChart",".dummyval") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_firewall_setting_changes(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Firewall Setting Changes", ".euiDataGrid",".euiDataGrid__noResults") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_firewall_policy_changes(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Firewall Policy Changes", ".euiDataGrid",".euiDataGrid__noResults") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_firewall_turned_on(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Firewall Turned On", ".euiDataGrid",".euiDataGrid__noResults") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_firewall_turned_off(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Firewall Turned Off", ".euiDataGrid",".euiDataGrid__noResults") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_audit_policy_changes(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Audit Policy Changes", ".euiDataGrid",".euiDataGrid__noResults") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_kerberos_policy_changes(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Kerberos Policy Changes", ".euiDataGrid",".euiDataGrid__noResults") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_pc_start_up(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "PC Start Up", ".echChart",".dummyval") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_pc_shut_down(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "PC Shut Down", ".echChart",".dummyval") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_pc_startups(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "PC Startups", ".expExpressionRenderer",".euiText") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_pc_shutdowns(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "PC Shutdowns", ".expExpressionRenderer",".euiText") \ No newline at end of file diff --git a/testing/tests/selenium_tests/cluster/test_privileged_activity_log_dashboard.py b/testing/tests/selenium_tests/cluster/test_privileged_activity_log_dashboard.py new file mode 100644 index 00000000..eb0255b3 --- /dev/null +++ b/testing/tests/selenium_tests/cluster/test_privileged_activity_log_dashboard.py @@ -0,0 +1,56 @@ +import pytest +from selenium.webdriver.support.ui import WebDriverWait +from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.common.by import By +from selenium.common.exceptions import NoSuchElementException +from .lib import dashboard_test_function + +class TestPrivilegedActivityLogDashboard: + dashboard_id = "09d32fc8-e1d1-418a-8793-507ed5430d3d" + + @pytest.fixture(scope="class") + def setup_login(self, driver, login): + login() + yield driver + + @pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_privilege_service_attempts(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Privilege service attempts", ".euiText",".xyChart__empty") + + @pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_process_creation(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Process creation", ".echChart",".dummyval") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_process_termination(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Process termination", ".echChart",".xyChart__empty") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_non_sensitive_privilege(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Non-sensitive privilege attempts", ".expExpressionRenderer",".dummyval") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_sensitive_privilege_attempts(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Non-sensitive privilege attempts", ".expExpressionRenderer",".dummyval") + + @pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_assigned_token(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Assigned Token", ".expExpressionRenderer",".euiText") + + @pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_privilege_access_entry(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Privilege Activity entry", ".euiFlexGroup",".euiDataGrid__noResults") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_process_creation_activities(self, setup_login, kibana_url, timeout): + driver = setup_login + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Process creation-Activities", ".expExpressionRenderer",".xyChart__empty") + + \ No newline at end of file diff --git a/testing/tests/selenium_tests/cluster/test_process_explorer_dashboard.py b/testing/tests/selenium_tests/cluster/test_process_explorer_dashboard.py index a9dde1fc..ad25239b 100644 --- a/testing/tests/selenium_tests/cluster/test_process_explorer_dashboard.py +++ b/testing/tests/selenium_tests/cluster/test_process_explorer_dashboard.py @@ -7,53 +7,53 @@ from .lib import dashboard_test_function class TestProcessExplorerDashboard: - dashboard_id = "f2cbc110-8400-11ee-a3de-f1bc0525ad6c" + #dashboard_id = "f2cbc110-8400-11ee-a3de-f1bc0525ad6c" + dashboard_id = "cf38381a-e9e1-4b28-914e-0819fb59e53c" @pytest.fixture(scope="class") def setup_login(self, driver, login): login() yield driver - @pytest.mark.skip(reason="Skipping this test") + #@pytest.mark.skip(reason="Skipping this test") def test_files_created_over_time_in_downloads(self, setup_login, kibana_url, timeout): #Did not find this dashboard panel on UI. This test should be removed. driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Files created (in Downloads)", ".needarealvaluehere",".euiFlexGroup") - @pytest.mark.skip(reason="Skipping this test") + #@pytest.mark.skip(reason="Skipping this test") def test_files_created_in_downloads(self, setup_login, kibana_url, timeout): #This dashboard panel is not working corectly. Shows no data even when there is data. Create issue LME#294 driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Files created (in Downloads)", ".euiFlexGroup", ".euiDataGrid__noResults",) - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_hosts(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Hosts", ".tbvChart",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_process_spawn_event_logs_id1(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Process spawn event logs (Sysmon ID 1)", ".euiDataGrid",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_process_spawns_over_time(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Process spawns over time", ".echChart",".xyChart__empty") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_processes_created_by_users_over_time(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Processes created by users over time", ".echChart",".xyChart__empty") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_registry_events_sysmon_12_13_14(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Registry events (Sysmon 12, 13, 14)", ".euiDataGrid__focusWrap",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_users(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Users", ".euiDataGrid__focusWrap",".euiText") - - + \ No newline at end of file diff --git a/testing/tests/selenium_tests/cluster/test_security_dashboard_security_log.py b/testing/tests/selenium_tests/cluster/test_security_dashboard_security_log.py index 94182b09..fc4140aa 100644 --- a/testing/tests/selenium_tests/cluster/test_security_dashboard_security_log.py +++ b/testing/tests/selenium_tests/cluster/test_security_dashboard_security_log.py @@ -7,92 +7,90 @@ from .lib import dashboard_test_function class TestSecurityDashboardSecurityLog: - dashboard_id = "51186cd0-e8e9-11e9-9070-f78ae052729a" - + #dashboard_id = "51186cd0-e8e9-11e9-9070-f78ae052729a" + dashboard_id = "beeeb066-d497-4b2a-99d3-44d741238bd1" + @pytest.fixture(scope="class") def setup_login(self, driver, login): login() yield driver - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_computer_filter_results(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Select a computer to filter the below results. Leave blank for all", ".euiFlexGroup",".dummyval") - # The arguement ".dummyval" is being used though it is not a valid selector. - # This panel should always have a visualization so there should never be no data message displayed. - # If there is no visualization rendered or "No Results found" message is displayed for this panel on dashboard, this test should fail which is correct behavior + # This panel no longer exists in release 2.0 - @pytest.mark.skip(reason="Skipping this test") + #@pytest.mark.skip(reason="Skipping this test") def test_logons_with_special_privileges(self, setup_login, kibana_url, timeout): #This dashboard panel needs test data. Currently the panel only gives No Result found driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security log - Logons with special privileges assigned - event ID 4672", ".needarealvaluehere",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_computer_filter(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Select a computername to filter", ".tbvChart",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_computers_showing_failed_login_attempts_none(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Computers showing failed login attempts - 10 maximum shown", ".echChart",".visError") + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Failed logon attempts", ".visualization",".visError") - @pytest.mark.skip(reason="Skipping this test") + #@pytest.mark.skip(reason="Skipping this test") def test_credential_sent_as_clear_text_type_8(self, setup_login, kibana_url, timeout): #This dashboard panel needs test data. Currently the panel only gives No Result found driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security log - Credential sent as clear text - Logon type 8", ".needarealvaluehere",".visError") - - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_failed_logon_and_reason(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Failed logon and reason (status code)", ".echChart",".euiText") + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Failed logon status codes", ".mkdVis",".dummyval") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_failed_logons(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Failed Logons", ".unifiedDataTable",".euiDataGrid__noResults") - @pytest.mark.skip(reason="Skipping this test") + #@pytest.mark.skip(reason="Skipping this test") def test_log_cleared_event_id_1102_or_104(self, setup_login, kibana_url, timeout): #This dashboard panel needs test data. Currently the panel only gives No Result found driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Log Cleared - event ID 1102 or 104", ".needarealvaluehere",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_process_started_with_different_creds(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security log - Process started with different credentials- event ID 4648 [could be RUNAS, scheduled tasks]", ".euiDataGrid",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_security_log_events_detail(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security log events - Detail", ".euiDataGrid",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_security_log_logon_as_a_service_type_5(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Sercurity log - logon as a service - Logon type 5",".euiDataGrid",".visError") + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security log - logon as a service - Logon type 5",".visualization",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_security_log_logon_created_logon_type_2(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security log - Logon created - Logon type 2",".tbvChart",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_security_log_network_logon_created_type_3(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security log - network logon created - Logon type 3",".tbvChart",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_security_log_process_creation_event_id_4688(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security log - Process creation - event ID 4688",".euiDataGrid",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_security_log_events(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security logs events",".visualization", ".dummyval") @@ -100,12 +98,12 @@ def test_security_log_events(self, setup_login, kibana_url, timeout): # This panel should always have a visualization so there should never be no data message displayed. # If there is no visualization rendered or "No Results found" message is displayed for this panel on dashboard, this test should fail which is correct behavior - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_failed_logon_type_codes(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Failed logon type codes",".visualization", ".dummyval") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_failed_logon_status_codes(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Failed logon status codes",".visualization", ".dummyval") \ No newline at end of file diff --git a/testing/tests/selenium_tests/cluster/test_sysmon_summary_dashboard.py b/testing/tests/selenium_tests/cluster/test_sysmon_summary_dashboard.py index 5156141a..23eb783d 100644 --- a/testing/tests/selenium_tests/cluster/test_sysmon_summary_dashboard.py +++ b/testing/tests/selenium_tests/cluster/test_sysmon_summary_dashboard.py @@ -7,20 +7,19 @@ from .lib import dashboard_test_function class TestSysmonSummaryDashboard: - dashboard_id = "d2c73990-e5d4-11e9-8f1d-73a2ea4cc3ed" - + #dashboard_id = "d2c73990-e5d4-11e9-8f1d-73a2ea4cc3ed" + dashboard_id = "3e1721f1-7056-4a8e-8b63-f75a9bbb37b5" @pytest.fixture(scope="class") def setup_login(self, driver, login): login() yield driver - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_count_of_sysmon_events_by_event_code(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Count of Sysmon events by event code", ".tbvChart",".visError") - - - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_total_number_of_sysmon_events_found(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Total number of Sysmon events found", ".visualization",".dummyval") @@ -30,7 +29,7 @@ def test_total_number_of_sysmon_events_found(self, setup_login, kibana_url, time - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_percentage_of_sysmon_events_by_event_code(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Percentage of Sysmon events by event code", ".echChart",".euiText") @@ -39,16 +38,15 @@ def test_percentage_of_sysmon_events_by_event_code(self, setup_login, kibana_url def test_sysmon_events(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Sysmon events", ".echChart",".visError") + #This panel no longer exists in Rel 2 - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_top10_hosts_generating_most_sysmon_data(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Top 10 hosts generating the most Sysmon data", ".tbvChart",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_sysmon_events_code_reference(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Sysmon event code reference", ".visualization",".dummyval") - - + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Sysmon event code reference", ".visualization",".dummyval") \ No newline at end of file diff --git a/testing/tests/selenium_tests/cluster/test_user_h_r_dashboard.py b/testing/tests/selenium_tests/cluster/test_user_h_r_dashboard.py index 417595dd..8c8fea00 100644 --- a/testing/tests/selenium_tests/cluster/test_user_h_r_dashboard.py +++ b/testing/tests/selenium_tests/cluster/test_user_h_r_dashboard.py @@ -7,39 +7,39 @@ from .lib import dashboard_test_function class TestUserHRDashboard: - dashboard_id = "618bc5d0-84f8-11ee-9838-ff0db128d8b2" - + #dashboard_id = "618bc5d0-84f8-11ee-9838-ff0db128d8b2" + dashboard_id = "ff0170e5-e0ef-4ca1-8188-c7bb9d736898" @pytest.fixture(scope="class") def setup_login(self, driver, login): login() yield driver - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_filter_computers(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Filter Computers", ".echChart",".xyChart__empty") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_filter_users(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Filter Users", ".echChart",".xyChart__empty") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_inperson_vs_remote_logons(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "In person vs Remote logons", ".echChart",".euiText") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_user_logoff_events(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "User logoff events (correlate to logon events)", ".euiDataGrid",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_user_logon_events(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "User logon events (filter by LogonId)", ".euiDataGrid",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_select_domain_and_username(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Select domain(s) and username(s)", ".icvContainer",".dummyval") @@ -47,7 +47,7 @@ def test_select_domain_and_username(self, setup_login, kibana_url, timeout): # This panel should always have a visualization so there should never be no data message displayed. # If there is no visualization rendered or "No Results found" message is displayed for this panel on dashboard, this test should fail which is correct behavior - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_hr_user_activity_title(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "HR - User activity title", ".visualization",".dummyval") @@ -56,13 +56,14 @@ def test_hr_user_activity_title(self, setup_login, kibana_url, timeout): def test_all_user_events_dayofweek_hourofday(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "All User Events by Day of Week, Hour of Day", ".echChart",".dummyval") + #This panel is no longer available in release 2 - @pytest.mark.skip(reason="This test is for reference to use in 2.0") - def test_timestamps_by_count(self, setup_login, kibana_url, timeout): + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_events_by_time(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Timestamps by Count", ".echChart",".dummyval") + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Events by Time", ".echChart",".dummyval") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_hr_logon_title(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "HR - Logon title", ".visualization",".dummyval") diff --git a/testing/tests/selenium_tests/cluster/test_user_security_dashboard.py b/testing/tests/selenium_tests/cluster/test_user_security_dashboard.py index 99e135aa..7e39b10d 100644 --- a/testing/tests/selenium_tests/cluster/test_user_security_dashboard.py +++ b/testing/tests/selenium_tests/cluster/test_user_security_dashboard.py @@ -7,14 +7,15 @@ from .lib import dashboard_test_function class TestUserSecurityDashboard: - dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" - + #dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" + dashboard_id = "2fc36188-8461-4927-932e-0e452b7dc3ac" + @pytest.fixture(scope="class") def setup_login(self, driver, login): login() yield driver - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_search_users(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Search users", ".visualization",".dummyval") @@ -22,168 +23,162 @@ def test_search_users(self, setup_login, kibana_url, timeout): # This panel should always have a visualization so there should never be no data message displayed. # If there is no visualization rendered or "No Results found" message is displayed for this panel on dashboard, this test should fail which is correct behavior - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_filter_hosts(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Filter hosts", ".tbvChart",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_search_hosts(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Search hosts", ".visualization",".dummyval") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_filter_users(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Filter users", ".euiDataGrid",".euiText") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_security_logons_title(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security - Logons Title", ".visualization",".dummyval") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_security_logons_attempts(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security - Logon attempts", ".visualization",".dummyval") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_security_logons_hosts(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security - Logon hosts", ".visualization",".dummyval") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_logon_attempts(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Logon attempts", ".echChart",".xyChart__empty") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_logged_on_computers(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Logged on computers", ".echChart",".euiText") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_user_logon_logoff_events(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "User Logon & Logoff Events", ".euiDataGrid",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_security_network_title(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security - Network Title", ".visualization",".dummyval") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_all_network_connections(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "All network connections", ".echChart",".xyChart__empty") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_network_connections_from_nonbrowser_processes(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Network connections from non-browser processes", ".tbvChart",".visError") + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Unusual network connections from non-browser processes", ".tbvChart",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") - def test_network_connections_by_protocol(self, setup_login, kibana_url, timeout): + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") + def test_security_network_connections_area(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Network connection by protocol", ".echChart",".xyChart__empty") + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security - Network connections area", ".echChart",".xyChart__empty") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_unusual_network_connections_from_non_browser_processes(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Unusual network connections from non-browser processes", ".tbvChart",".visError") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_network_connection_events(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Network Connection Events (Sysmon ID 3)", ".euiDataGrid",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_unusual_network_connections_events_sysmonid_3(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Network Connection Events (Sysmon ID 3)", ".euiDataGrid",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_security_processes_title(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security - Processes Title", ".visualization",".dummyval") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_spawned_processes(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Spawned Processes", ".euiDataGrid",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_powershell_events(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Powershell Events", ".visualization",".dummyval") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_powershell_events_over_time(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Powershell events over time", ".echChart",".xyChart__empty") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_powershell_events_by_computer(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Powershell events by computer", ".echChart",".euiText") - @pytest.mark.skip(reason="Skipping this test") + #@pytest.mark.skip(reason="Skipping this test") def test_potentially_suspicious_powershell(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Potentially suspicious powershell", ".needarealvaluehere",".euiDataGrid__noResults") - #This dashboard panel needs test data. Currently the panel only gives No Result found + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Potentially suspicious powershell", ".euiDataGrid__focusWrap",".euiDataGrid__noResults") - @pytest.mark.skip(reason="Skipping this test") + #@pytest.mark.skip(reason="Skipping this test") def test_powershell_network_connections(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Powershell network connections", ".needarealvaluehere",".euiDataGrid__noResults") + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Powershell network connections", ".euiDataGrid__focusWrap",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_security_files_title(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security - Files title", ".visualization",".dummyval") - @pytest.mark.skip(reason="Skipping this test") + #@pytest.mark.skip(reason="Skipping this test") def test_references_to_temporary_files(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "References to temporary files", ".needarealvaluehere",".visError") + dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "References to temporary files", ".tbvChart",".visError") - @pytest.mark.skip(reason="Skipping this test") + #@pytest.mark.skip(reason="Skipping this test") def test_raw_access_read(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "RawAccessRead (Sysmon Event 9)", ".needarealvaluehere",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_windows_defender_title(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Security - Windows Defender Title", ".visualization",".dummyval") - @pytest.mark.skip(reason="Skipping this test") + #@pytest.mark.skip(reason="Skipping this test") def test_av_detections(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "AV Detections (Event 1116)", ".needarealvaluehere",".euiDataGrid__noResults") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_defender_event_count(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "Defender event count", ".visualization",".dummyval") - @pytest.mark.skip(reason="This test is for reference to use in 2.0") + #@pytest.mark.skip(reason="This test is for reference to use in 2.0") def test_av_hits_count(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_test_function(driver, kibana_url, timeout, self.dashboard_id, "AV Hits (Count)", ".visualization",".dummyval") - - - - - @@ -201,6 +196,4 @@ def test_av_hits_count(self, setup_login, kibana_url, timeout): - - - + \ No newline at end of file diff --git a/testing/tests/selenium_tests/linux_only/test_basic_loading.py b/testing/tests/selenium_tests/linux_only/test_basic_loading.py index 71ecffa0..85315711 100644 --- a/testing/tests/selenium_tests/linux_only/test_basic_loading.py +++ b/testing/tests/selenium_tests/linux_only/test_basic_loading.py @@ -16,8 +16,7 @@ def setup_login(self, driver, login): # yield # driver.quit() # Clean up the browser (driver) here - - # @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_title(self, setup_login, kibana_url, timeout): driver = setup_login driver.get(f"{kibana_url}/app/dashboards") @@ -38,5 +37,4 @@ def test_dashboard_menu(self, setup_login, kibana_url, timeout): expected_cond = EC.presence_of_element_located((By.CSS_SELECTOR, selector)) WebDriverWait(driver, timeout).until(expected_cond) panel = driver.find_element(By.CSS_SELECTOR, selector) - assert "No results found" not in panel.get_attribute("innerHTML") - + assert "No results found" not in panel.get_attribute("innerHTML") \ No newline at end of file diff --git a/testing/tests/selenium_tests/linux_only/test_computer_software_overview_dashboard_lo.py b/testing/tests/selenium_tests/linux_only/test_computer_software_overview_dashboard_lo.py index c69e98e9..fbefa4da 100644 --- a/testing/tests/selenium_tests/linux_only/test_computer_software_overview_dashboard_lo.py +++ b/testing/tests/selenium_tests/linux_only/test_computer_software_overview_dashboard_lo.py @@ -6,6 +6,8 @@ from selenium.common.exceptions import NoSuchElementException class TestComputerSoftwareOverviewDashboard: + #dashboard_id = "new dashboard" + dashboard_id = "ce98c19b-587f-4d76-9c49-2e9acee257d5" @pytest.fixture(scope="class") def setup_login(self, driver, login): login() @@ -14,8 +16,8 @@ def setup_login(self, driver, login): @pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_dashboard_menu(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "33f0d3b0-8b8a-11ea-b1c6-a5bf39283f12" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "33f0d3b0-8b8a-11ea-b1c6-a5bf39283f12" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Dashboard Menu" @@ -25,11 +27,11 @@ def test_dashboard_menu(self, setup_login, kibana_url, timeout): panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_host_count(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "33f0d3b0-8b8a-11ea-b1c6-a5bf39283f12" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "33f0d3b0-8b8a-11ea-b1c6-a5bf39283f12" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Host Count" @@ -37,5 +39,4 @@ def test_host_count(self, setup_login, kibana_url, timeout): expected_cond = EC.presence_of_element_located((By.CSS_SELECTOR, selector)) WebDriverWait(driver, timeout).until(expected_cond) panel = driver.find_element(By.CSS_SELECTOR, selector) - assert "No results found" not in panel.get_attribute("innerHTML") - + assert "No results found" not in panel.get_attribute("innerHTML") \ No newline at end of file diff --git a/testing/tests/selenium_tests/linux_only/test_health_check_dashboard_lo.py b/testing/tests/selenium_tests/linux_only/test_health_check_dashboard_lo.py index f6dcde61..945f520c 100644 --- a/testing/tests/selenium_tests/linux_only/test_health_check_dashboard_lo.py +++ b/testing/tests/selenium_tests/linux_only/test_health_check_dashboard_lo.py @@ -11,10 +11,12 @@ def setup_login(self, driver, login): login() yield driver - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_users_seen(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "51fe1470-fa59-11e9-bf25-8f92ffa3e3ec" + #dashboard_id = "51fe1470-fa59-11e9-bf25-8f92ffa3e3ec" + dashboard_id = "fff78bfe-2758-4fa1-939f-362380fc607d" driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) @@ -22,4 +24,4 @@ def test_users_seen(self, setup_login, kibana_url, timeout): selector = f'div[data-title="{panel_title}"]' expected_cond = EC.presence_of_element_located((By.CSS_SELECTOR, selector)) WebDriverWait(driver, timeout).until(expected_cond) - panel = driver.find_element(By.CSS_SELECTOR, selector) + panel = driver.find_element(By.CSS_SELECTOR, selector) \ No newline at end of file diff --git a/testing/tests/selenium_tests/linux_only/test_security_dashboard_security_log_lo.py b/testing/tests/selenium_tests/linux_only/test_security_dashboard_security_log_lo.py index 8427c3a3..41f754c7 100644 --- a/testing/tests/selenium_tests/linux_only/test_security_dashboard_security_log_lo.py +++ b/testing/tests/selenium_tests/linux_only/test_security_dashboard_security_log_lo.py @@ -6,16 +6,18 @@ from selenium.common.exceptions import NoSuchElementException class TestSecurityDashboardSecurityLog: + dashboard_id = "beeeb066-d497-4b2a-99d3-44d741238bd1" + @pytest.fixture(scope="class") def setup_login(self, driver, login): login() yield driver - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_security_log_events(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "51186cd0-e8e9-11e9-9070-f78ae052729a" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "51186cd0-e8e9-11e9-9070-f78ae052729a" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Security logs events" @@ -25,11 +27,11 @@ def test_security_log_events(self, setup_login, kibana_url, timeout): panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_failed_logon_attempts(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "51186cd0-e8e9-11e9-9070-f78ae052729a" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "51186cd0-e8e9-11e9-9070-f78ae052729a" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Failed logon attempts" @@ -39,11 +41,11 @@ def test_failed_logon_attempts(self, setup_login, kibana_url, timeout): panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_failed_logons_type_codes(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "51186cd0-e8e9-11e9-9070-f78ae052729a" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "51186cd0-e8e9-11e9-9070-f78ae052729a" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Failed logon type codes" @@ -53,11 +55,12 @@ def test_failed_logons_type_codes(self, setup_login, kibana_url, timeout): panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_failed_logon_status_codes(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "51186cd0-e8e9-11e9-9070-f78ae052729a" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "51186cd0-e8e9-11e9-9070-f78ae052729a" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Failed logon status codes" @@ -65,5 +68,4 @@ def test_failed_logon_status_codes(self, setup_login, kibana_url, timeout): expected_cond = EC.presence_of_element_located((By.CSS_SELECTOR, selector)) WebDriverWait(driver, timeout).until(expected_cond) panel = driver.find_element(By.CSS_SELECTOR, selector) - assert "No results found" not in panel.get_attribute("innerHTML") - + assert "No results found" not in panel.get_attribute("innerHTML") \ No newline at end of file diff --git a/testing/tests/selenium_tests/linux_only/test_sysmon_summary_dashboard_lo.py b/testing/tests/selenium_tests/linux_only/test_sysmon_summary_dashboard_lo.py index 61493723..eccac676 100644 --- a/testing/tests/selenium_tests/linux_only/test_sysmon_summary_dashboard_lo.py +++ b/testing/tests/selenium_tests/linux_only/test_sysmon_summary_dashboard_lo.py @@ -6,16 +6,17 @@ from selenium.common.exceptions import NoSuchElementException class TestSysmonSummaryDashboard: + dashboard_id = "3e1721f1-7056-4a8e-8b63-f75a9bbb37b5" @pytest.fixture(scope="class") def setup_login(self, driver, login): login() yield driver - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_total_number_of_sysmon_events_found(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "d2c73990-e5d4-11e9-8f1d-73a2ea4cc3ed" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "d2c73990-e5d4-11e9-8f1d-73a2ea4cc3ed" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Total number of Sysmon events found" @@ -25,11 +26,12 @@ def test_total_number_of_sysmon_events_found(self, setup_login, kibana_url, time panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_sysmon_event_code_reference(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "d2c73990-e5d4-11e9-8f1d-73a2ea4cc3ed" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "d2c73990-e5d4-11e9-8f1d-73a2ea4cc3ed" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Sysmon event code reference" @@ -37,5 +39,4 @@ def test_sysmon_event_code_reference(self, setup_login, kibana_url, timeout): expected_cond = EC.presence_of_element_located((By.CSS_SELECTOR, selector)) WebDriverWait(driver, timeout).until(expected_cond) panel = driver.find_element(By.CSS_SELECTOR, selector) - assert "No results found" not in panel.get_attribute("innerHTML") - + assert "No results found" not in panel.get_attribute("innerHTML") \ No newline at end of file diff --git a/testing/tests/selenium_tests/linux_only/test_user_h_r_dashboard_lo.py b/testing/tests/selenium_tests/linux_only/test_user_h_r_dashboard_lo.py index d3ee7131..99b97533 100644 --- a/testing/tests/selenium_tests/linux_only/test_user_h_r_dashboard_lo.py +++ b/testing/tests/selenium_tests/linux_only/test_user_h_r_dashboard_lo.py @@ -6,10 +6,13 @@ from selenium.common.exceptions import NoSuchElementException class TestUserHRDashboard: + dashboard_id = "ff0170e5-e0ef-4ca1-8188-c7bb9d736898" @pytest.fixture(scope="class") def setup_login(self, driver, login): login() yield driver + + @pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_dashboard_menu(self, setup_login, kibana_url, timeout): driver = setup_login dashboard_id = "618bc5d0-84f8-11ee-9838-ff0db128d8b2" @@ -23,11 +26,11 @@ def test_dashboard_menu(self, setup_login, kibana_url, timeout): panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_domains_and_usernames(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "618bc5d0-84f8-11ee-9838-ff0db128d8b2" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "618bc5d0-84f8-11ee-9838-ff0db128d8b2" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Select domain(s) and username(s)" @@ -40,8 +43,8 @@ def test_domains_and_usernames(self, setup_login, kibana_url, timeout): @pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_all_user_events(self, driver, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "618bc5d0-84f8-11ee-9838-ff0db128d8b2" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "618bc5d0-84f8-11ee-9838-ff0db128d8b2" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "All User Events by Day of Week, Hour of Day" @@ -50,27 +53,27 @@ def test_all_user_events(self, driver, setup_login, kibana_url, timeout): WebDriverWait(driver, timeout).until(expected_cond) panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") + #This panel is no longer available in Release 2.0 - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_timestamps_by_count(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "618bc5d0-84f8-11ee-9838-ff0db128d8b2" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "618bc5d0-84f8-11ee-9838-ff0db128d8b2" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) - panel_title = "Timestamps by Count" + panel_title = "Events by Time" selector = f'div[data-title="{panel_title}"]' expected_cond = EC.presence_of_element_located((By.CSS_SELECTOR, selector)) WebDriverWait(driver, timeout).until(expected_cond) panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_dashboard_menu(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "51186cd0-e8e9-11e9-9070-f78ae052729a" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "51186cd0-e8e9-11e9-9070-f78ae052729a" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Dashboard Menu" @@ -78,5 +81,4 @@ def test_dashboard_menu(self, setup_login, kibana_url, timeout): expected_cond = EC.presence_of_element_located((By.CSS_SELECTOR, selector)) WebDriverWait(driver, timeout).until(expected_cond) panel = driver.find_element(By.CSS_SELECTOR, selector) - assert "No results found" not in panel.get_attribute("innerHTML") - + assert "No results found" not in panel.get_attribute("innerHTML") \ No newline at end of file diff --git a/testing/tests/selenium_tests/linux_only/test_user_security_dashboard_lo.py b/testing/tests/selenium_tests/linux_only/test_user_security_dashboard_lo.py index 0483fd7a..4a291510 100644 --- a/testing/tests/selenium_tests/linux_only/test_user_security_dashboard_lo.py +++ b/testing/tests/selenium_tests/linux_only/test_user_security_dashboard_lo.py @@ -6,16 +6,17 @@ from selenium.common.exceptions import NoSuchElementException class TestUserSecurityDashboard: + dashboard_id = "2fc36188-8461-4927-932e-0e452b7dc3ac" @pytest.fixture(scope="class") def setup_login(self, driver, login): login() yield driver - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_search_users(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Search users" @@ -25,11 +26,11 @@ def test_search_users(self, setup_login, kibana_url, timeout): panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_search_hosts(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Search hosts" @@ -39,11 +40,11 @@ def test_search_hosts(self, setup_login, kibana_url, timeout): panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_security_logon_attempts(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Security - Logon attempts" @@ -53,11 +54,11 @@ def test_security_logon_attempts(self, setup_login, kibana_url, timeout): panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_security_logon_hosts(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Security - Logon hosts" @@ -67,11 +68,11 @@ def test_security_logon_hosts(self, setup_login, kibana_url, timeout): panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_av_hits(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "AV Hits (Count)" @@ -81,11 +82,12 @@ def test_av_hits(self, setup_login, kibana_url, timeout): panel = driver.find_element(By.CSS_SELECTOR, selector) assert "No results found" not in panel.get_attribute("innerHTML") - @pytest.mark.skip(reason="This test isn't working for 2.0 yet") + + #@pytest.mark.skip(reason="This test isn't working for 2.0 yet") def test_defender_event_count(self, setup_login, kibana_url, timeout): driver = setup_login - dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" - driver.get(f"{kibana_url}/app/dashboards#/view/{dashboard_id}") + #dashboard_id = "e5f203f0-6182-11ee-b035-d5f231e90733" + driver.get(f"{kibana_url}/app/dashboards#/view/{self.dashboard_id}") expected_cond = EC.presence_of_element_located((By.CLASS_NAME, "react-grid-layout")) WebDriverWait(driver, timeout).until(expected_cond) panel_title = "Defender event count" @@ -93,5 +95,4 @@ def test_defender_event_count(self, setup_login, kibana_url, timeout): expected_cond = EC.presence_of_element_located((By.CSS_SELECTOR, selector)) WebDriverWait(driver, timeout).until(expected_cond) panel = driver.find_element(By.CSS_SELECTOR, selector) - assert "No results found" not in panel.get_attribute("innerHTML") - + assert "No results found" not in panel.get_attribute("innerHTML") \ No newline at end of file