Repository: aristanetworks/anta
Pull request #1210 (2025-05-21 13:17:21)

feat(anta.tests): Added Test case to verify the queue drop counters
# Description

Added Test case to verify the queue drop counters (**Jericho Platform**)

Fixes #https://github.com/aristanetworks/avd-internal/issues/254

# Checklist:

- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my code
- [X] I have run pre-commit for code linting and typing (`pre-commit run`)
- [ ] I have made corresponding changes to the documentation
- [X] I have added tests that prove my fix is effective or that my feature works
- [X] New and existing unit tests pass locally with my changes (`tox -e testenv`)


codspeed-hq[bot]: <!-- __CODSPEED_PERFORMANCE_REPORT_COMMENT__ -->
<!-- __CODSPEED_INSTRUMENTATION_PERFORMANCE_REPORT_COMMENT__ -->

## [CodSpeed Performance Report](https://codspeed.io/aristanetworks/anta/branches/vitthalmagadum%3AAI%2Fqueu_drops)

### Merging #1210 will **not alter performance**

<sub>Comparing <code>vitthalmagadum:AI/queu_drops</code> (7cfe94b) with <code>main</code> (0b6b9b5)</sub>



### Summary

`✅ 26` untouched benchmarks  




sonarqubecloud[bot]: ## [![Quality Gate Failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-failed-20px.png 'Quality Gate Failed')](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) **Quality Gate failed**  
Failed conditions  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [37.9% Coverage on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_coverage&view=list) (required ≥ 80%)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210)


sonarqubecloud[bot]: ## [![Quality Gate Failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-failed-20px.png 'Quality Gate Failed')](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) **Quality Gate failed**  
Failed conditions  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_coverage&view=list) (required ≥ 80%)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210)


sonarqubecloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [95.2% Coverage on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210)


sonarqubecloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210)


sonarqubecloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210)


github-actions[bot]: Conflicts have been resolved. A maintainer will review the pull request shortly.
sonarqubecloud[bot]: ## [![Quality Gate Failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-failed-20px.png 'Quality Gate Failed')](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) **Quality Gate failed**  
Failed conditions  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [C Reliability Rating on New Code](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) (required ≥ A)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210)

##   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png '') Catch issues before they fail your Quality Gate with our IDE extension ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png '') [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)


sonarqubecloud[bot]: ## [![Quality Gate Failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-failed-20px.png 'Quality Gate Failed')](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) **Quality Gate failed**  
Failed conditions  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/failed-16px.png '') [C Reliability Rating on New Code](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) (required ≥ A)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210)

##   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/light_bulb-16px.png '') Catch issues before they fail your Quality Gate with our IDE extension ![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/sonarlint-16px.png '') [SonarQube for IDE](https://www.sonarsource.com/products/sonarlint/features/connected-mode/?referrer=pull-request)


sonarqubecloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210)


sonarqubecloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [100.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210)


sonarqubecloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [95.5% Coverage on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210)


sonarqubecloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=aristanetworks_anta&pullRequest=1210&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=aristanetworks_anta&pullRequest=1210&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [97.5% Coverage on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=aristanetworks_anta&pullRequest=1210&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=aristanetworks_anta&pullRequest=1210)



Patch:
diff --git a/anta/constants.py b/anta/constants.py
index caf9c7f0..8f2a46f2 100644
--- a/anta/constants.py
+++ b/anta/constants.py
@@ -74,10 +74,7 @@ EOS_BLACKLIST_CMDS = [
     ANTA implements a mechanism to **prevent the execution of disruptive commands** such as `reload`, `write erase` or `configure terminal`.
 """
 
-UNSUPPORTED_PLATFORM_ERRORS = [
-    "not supported on this hardware platform",
-    "Invalid input (at token 2: 'trident')",
-]
+UNSUPPORTED_PLATFORM_ERRORS = ["not supported on this hardware platform", "Invalid input (at token 2: 'trident')", "Incomplete command (at token 4: 'drops')"]
 """Error messages indicating platform or hardware unsupported commands. Includes both general hardware
 platform errors and specific ASIC family limitations.
 
diff --git a/anta/tools.py b/anta/tools.py
index c7fd4ab6..875a4afc 100644
--- a/anta/tools.py
+++ b/anta/tools.py
@@ -457,3 +457,65 @@ def is_interface_ignored(interface: str, ignored_interfaces: list[str] | None =
                 break
         return bool(any([interface_exact_match, interface_prefix in ignored_interfaces]))
     return None
+
+
+def get_value_by_range_key(dictionary: dict[str, Any], key: str, default: Any = None) -> Any:
+    """Get a value from a dictionary where keys represent ranges using the format '<prefix><start>-<end>' (e.g., 'TC0-4').
+
+    Returns the supplied default value or None if the key is not found.
+
+    Parameters
+    ----------
+    dictionary
+        A dictionary with keys as either:
+            - exact strings (e.g., 'TC1')
+            - range strings in format '<prefix><start>-<end>' (e.g., 'TC2-5')
+    key
+        The key to look up (e.g., 'TC1').
+    default
+        Default value returned if the key is not found.
+
+    Returns
+    -------
+    Any
+        Value or default value.
+
+    Examples
+    --------
+    >>> dictionary = {
+        "TC0": {"group": "Exact"},
+        "TC1-5": {"group": "A"},
+        "TC6-7": {"group": "B"},
+    }
+    >>> get_value_by_range_key("TC0", lookup_dict)
+    {'group': 'EXACT'}  # exact match takes priority
+
+    >>> get_value_by_range_key("TC3", dictionary)
+    {'group': 'A'}
+
+    >>> get_value_by_range_key("TC6", dictionary)
+    {'group': 'B'}
+
+    >>> get_value_by_range_key("TC9", dictionary)
+    None
+
+    >>> get_value_by_range_key("other1", dictionary)
+    None
+    """
+    # Exact match
+    if key in dictionary:
+        return dictionary[key]
+
+    # Range match
+    match = re.match(r"([a-zA-Z]+)(\d+)", key)
+    if not match:
+        return default
+
+    prefix, number = match.group(1), int(match.group(2))
+
+    for item, detail in dictionary.items():
+        key_match = re.match(rf"({prefix})(\d+)-(\d+)", item)
+        if key_match and int(key_match.group(2)) <= number <= int(key_match.group(3)):
+            return detail
+
+    return default


Test patch:
diff --git a/anta/tests/interfaces.py b/anta/tests/interfaces.py
index ed8f3fb8..75d366de 100644
--- a/anta/tests/interfaces.py
+++ b/anta/tests/interfaces.py
@@ -16,7 +16,7 @@ from anta.custom_types import Interface, InterfaceType, Percent, PortChannelInte
 from anta.decorators import skip_on_platforms
 from anta.input_models.interfaces import InterfaceDetail, InterfaceState
 from anta.models import AntaCommand, AntaTemplate, AntaTest
-from anta.tools import custom_division, get_item, get_value, is_interface_ignored
+from anta.tools import custom_division, get_item, get_value, get_value_by_range_key, is_interface_ignored
 
 BPS_GBPS_CONVERSIONS = 1000000000
 
@@ -1055,3 +1055,88 @@ class VerifyLACPInterfacesStatus(AntaTest):
             # Verify the actor churn and partner churn states
             if interface.lacp_churn_state:
                 self._verify_interface_churn_state(interface, interface_details)
+
+
+class VerifyInterfacesVoqAndEgressQueueDrops(AntaTest):
+    """Verifies interface ingress VOQ and egress queue drop counters.
+
+    Compatible with Arista 7280R, 7500R, and 7800R series platforms supporting Virtual Output Queues (VOQ).
+
+    Expected Results
+    ----------------
+    * Success: The test will pass if all VOQ and egress queue drops are within the defined threshold.
+    * Failure: The test will fail if any VOQ or egress queue drop exceeds the defined threshold.
+
+    Examples
+    --------
+    ```yaml
+    anta.tests.interfaces:
+      - VerifyInterfacesVoqAndEgressQueueDrops:
+          interfaces:
+            - Et1
+            - Et2
+          traffic_classes:
+            - TC0
+            - TC3
+    ```
+    """
+
+    categories: ClassVar[list[str]] = ["interfaces"]
+    commands: ClassVar[list[AntaCommand | AntaTemplate]] = [AntaCommand(command="show interfaces counters queue drops", revision=1)]
+
+    class Input(AntaTest.Input):
+        """Input model for the VerifyInterfacesVoqAndEgressQueueDrops test."""
+
+        interfaces: list[Interface] | None = None
+        """A list of interfaces to be tested. If not provided, all interfaces are tested."""
+        traffic_classes: list[str] | None = None
+        """List of traffic classes to be verified - TC0, TC1, etc. If None, all available traffic classes will be checked."""
+        packet_drop_threshold: PositiveInteger = 0
+        """Threshold for the number of dropped packets."""
+
+    def _get_traffic_classes_to_check(self, interface: Interface, output: dict[str, Any]) -> dict[str, Any]:
+        """Retrieve the traffic class and details to check based on the provided input traffic classes."""
+        # Prepare the dictionary of traffic classes to check
+        traffic_classes_to_check: dict[str, Any] = {}
+        if self.inputs.traffic_classes:
+            for tc_name in self.inputs.traffic_classes:
+                if (tc_detail := get_value_by_range_key(output["trafficClasses"], tc_name)) is None:
+                    self.result.is_failure(f"Interface: {interface} Traffic Class: {tc_name} - Not found")
+                    continue
+                traffic_classes_to_check[tc_name] = tc_detail
+        else:
+            # If no specific traffic classes are given, use all from the current interface
+            traffic_classes_to_check = output["trafficClasses"]
+
+        return traffic_classes_to_check
+
+    @skip_on_platforms(["cEOSLab", "vEOS-lab", "cEOSCloudLab", "vEOS"])
+    @AntaTest.anta_test
+    def test(self) -> None:
+        """Main test function for VerifyInterfacesVoqAndEgressQueueDrops."""
+        self.result.is_success()
+        command_output = self.instance_commands[0].json_output
+
+        # Prepare the dictionary of interfaces to check
+        interfaces_to_check: dict[Any, Any] = {}
+        if self.inputs.interfaces:
+            for intf_name in self.inputs.interfaces:
+                if (intf_detail := get_value(command_output["interfaces"], intf_name, separator="..")) is None:
+                    self.result.is_failure(f"Interface: {intf_name} - Not found")
+                    continue
+                interfaces_to_check[intf_name] = intf_detail
+        else:
+            # If no specific interfaces are given, use all interfaces
+            interfaces_to_check = command_output["interfaces"]
+
+        for interface, details in interfaces_to_check.items():
+            # Prepare the dictionary of traffic classes to check
+            traffic_classes_to_check = self._get_traffic_classes_to_check(interface, details)
+            for traffic_class, class_detail in traffic_classes_to_check.items():
+                egress_drop = class_detail["egressQueueCounters"]["countersSum"]["droppedPackets"]
+                ingress_drop = class_detail["ingressVoqCounters"]["countersSum"]["droppedPackets"]
+
+                if egress_drop > self.inputs.packet_drop_threshold or ingress_drop > self.inputs.packet_drop_threshold:
+                    self.result.is_failure(
+                        f"Interface: {interface} Traffic Class: {traffic_class} - Queue drops exceeds the threshold - VOQ: {ingress_drop}, Egress: {egress_drop}"
+                    )
diff --git a/examples/tests.yaml b/examples/tests.yaml
index 06985e6d..efd26c2f 100644
--- a/examples/tests.yaml
+++ b/examples/tests.yaml
@@ -341,6 +341,14 @@ anta.tests.interfaces:
         - name: Ethernet49/1
           status: adminDown
           line_protocol_status: notPresent
+  - VerifyInterfacesVoqAndEgressQueueDrops:
+      # Verifies interface ingress VOQ and egress queue drop counters.
+      interfaces:
+        - Et1
+        - Et2
+      traffic_classes:
+        - TC0
+        - TC3
   - VerifyIpVirtualRouterMac:
       # Verifies the IP virtual router MAC address.
       mac_address: 00:1c:73:00:dc:01
diff --git a/tests/units/anta_tests/test_interfaces.py b/tests/units/anta_tests/test_interfaces.py
index 283a4fe9..251e1144 100644
--- a/tests/units/anta_tests/test_interfaces.py
+++ b/tests/units/anta_tests/test_interfaces.py
@@ -19,6 +19,7 @@ from anta.tests.interfaces import (
     VerifyInterfaceIPv4,
     VerifyInterfacesSpeed,
     VerifyInterfacesStatus,
+    VerifyInterfacesVoqAndEgressQueueDrops,
     VerifyInterfaceUtilization,
     VerifyIPProxyARP,
     VerifyIpVirtualRouterMac,
@@ -2688,4 +2689,475 @@ DATA: AntaUnitTestDataDict = {
             ],
         },
     },
+    (VerifyInterfacesVoqAndEgressQueueDrops, "success"): {
+        "eos_data": [
+            {
+                "interfaces": {
+                    "Ethernet48": {
+                        "trafficClasses": {
+                            "TC0": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                            "TC1": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                    "Ethernet49": {
+                        "trafficClasses": {
+                            "TC0": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                            "TC1": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                }
+            }
+        ],
+        "expected": {"result": AntaTestStatus.SUCCESS},
+    },
+    (VerifyInterfacesVoqAndEgressQueueDrops, "success-range-of-traffic-class"): {
+        "eos_data": [
+            {
+                "interfaces": {
+                    "Ethernet48": {
+                        "trafficClasses": {
+                            "TC0-5": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                    "Ethernet49": {
+                        "trafficClasses": {
+                            "TC0-5": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                }
+            }
+        ],
+        "inputs": {"interfaces": ["Ethernet48", "Ethernet49"], "traffic_classes": ["TC0", "TC1", "TC2", "TC3", "TC4", "TC5"]},
+        "expected": {"result": AntaTestStatus.SUCCESS},
+    },
+    (VerifyInterfacesVoqAndEgressQueueDrops, "success-specific-intf"): {
+        "eos_data": [
+            {
+                "interfaces": {
+                    "Ethernet48": {
+                        "trafficClasses": {
+                            "TC0": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                            "TC1": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                    "Ethernet49": {
+                        "trafficClasses": {
+                            "TC0": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 5,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 5,
+                                    },
+                                },
+                            },
+                            "TC1": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 5,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 5,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                }
+            }
+        ],
+        "inputs": {"interfaces": ["Ethernet48"]},
+        "expected": {"result": AntaTestStatus.SUCCESS},
+    },
+    (VerifyInterfacesVoqAndEgressQueueDrops, "success-all-intf-specific-traffic-class"): {
+        "eos_data": [
+            {
+                "interfaces": {
+                    "Ethernet48": {
+                        "trafficClasses": {
+                            "TC0": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                            "TC1": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 4,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 5,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                    "Ethernet49": {
+                        "trafficClasses": {
+                            "TC0": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                            "TC1": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 5,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 4,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                }
+            }
+        ],
+        "inputs": {"traffic_classes": ["TC0"]},
+        "expected": {"result": AntaTestStatus.SUCCESS},
+    },
+    (VerifyInterfacesVoqAndEgressQueueDrops, "success-specific-intf-specific-traffic-class"): {
+        "eos_data": [
+            {
+                "interfaces": {
+                    "Ethernet48": {
+                        "trafficClasses": {
+                            "TC0": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                            "TC1": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 4,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 5,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                    "Ethernet49": {
+                        "trafficClasses": {
+                            "TC0": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 5,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 6,
+                                    },
+                                },
+                            },
+                            "TC1": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 5,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 4,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                }
+            }
+        ],
+        "inputs": {"interfaces": ["Ethernet48"], "traffic_classes": ["TC0"]},
+        "expected": {"result": AntaTestStatus.SUCCESS},
+    },
+    (VerifyInterfacesVoqAndEgressQueueDrops, "failure"): {
+        "eos_data": [
+            {
+                "interfaces": {
+                    "Ethernet48": {
+                        "trafficClasses": {
+                            "TC0": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 3,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                            "TC1": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 4,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 5,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                    "Ethernet49": {
+                        "trafficClasses": {
+                            "TC0": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 5,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 6,
+                                    },
+                                },
+                            },
+                            "TC1": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 7,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 7,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                }
+            }
+        ],
+        "expected": {
+            "result": AntaTestStatus.FAILURE,
+            "messages": [
+                "Interface: Ethernet48 Traffic Class: TC0 - Queue drops exceeds the threshold - VOQ: 3, Egress: 0",
+                "Interface: Ethernet48 Traffic Class: TC1 - Queue drops exceeds the threshold - VOQ: 4, Egress: 5",
+                "Interface: Ethernet49 Traffic Class: TC0 - Queue drops exceeds the threshold - VOQ: 5, Egress: 6",
+                "Interface: Ethernet49 Traffic Class: TC1 - Queue drops exceeds the threshold - VOQ: 7, Egress: 7",
+            ],
+        },
+    },
+    (VerifyInterfacesVoqAndEgressQueueDrops, "failure-intf-not-found"): {
+        "eos_data": [{"interfaces": {}}],
+        "inputs": {"interfaces": ["Ethernet48"]},
+        "expected": {
+            "result": AntaTestStatus.FAILURE,
+            "messages": [
+                "Interface: Ethernet48 - Not found",
+            ],
+        },
+    },
+    (VerifyInterfacesVoqAndEgressQueueDrops, "failure-traffic-class-not-found"): {
+        "eos_data": [
+            {
+                "interfaces": {
+                    "Ethernet48": {
+                        "trafficClasses": {
+                            "TC0": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 3,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                        }
+                    }
+                }
+            }
+        ],
+        "inputs": {"traffic_classes": ["TC1"]},
+        "expected": {
+            "result": AntaTestStatus.FAILURE,
+            "messages": [
+                "Interface: Ethernet48 Traffic Class: TC1 - Not found",
+            ],
+        },
+    },
+    (VerifyInterfacesVoqAndEgressQueueDrops, "failure-range-of-traffic-class"): {
+        "eos_data": [
+            {
+                "interfaces": {
+                    "Ethernet48": {
+                        "trafficClasses": {
+                            "TC0-5": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 1,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 0,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                    "Ethernet49": {
+                        "trafficClasses": {
+                            "TC0-5": {
+                                "ingressVoqCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 1,
+                                    },
+                                },
+                                "egressQueueCounters": {
+                                    "countersSum": {
+                                        "droppedPackets": 2,
+                                    },
+                                },
+                            },
+                        }
+                    },
+                }
+            }
+        ],
+        "inputs": {"interfaces": ["Ethernet48", "Ethernet49"], "traffic_classes": ["TC0", "TC1", "TC2"]},
+        "expected": {
+            "result": AntaTestStatus.FAILURE,
+            "messages": [
+                "Interface: Ethernet48 Traffic Class: TC0 - Queue drops exceeds the threshold - VOQ: 1, Egress: 0",
+                "Interface: Ethernet48 Traffic Class: TC1 - Queue drops exceeds the threshold - VOQ: 1, Egress: 0",
+                "Interface: Ethernet48 Traffic Class: TC2 - Queue drops exceeds the threshold - VOQ: 1, Egress: 0",
+                "Interface: Ethernet49 Traffic Class: TC0 - Queue drops exceeds the threshold - VOQ: 1, Egress: 2",
+                "Interface: Ethernet49 Traffic Class: TC1 - Queue drops exceeds the threshold - VOQ: 1, Egress: 2",
+                "Interface: Ethernet49 Traffic Class: TC2 - Queue drops exceeds the threshold - VOQ: 1, Egress: 2",
+            ],
+        },
+    },
 }