Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Network Access on Transport Layer (TCP/UDP) Ports #6

Open
gfcredera opened this issue Sep 12, 2024 · 0 comments
Open

Test Network Access on Transport Layer (TCP/UDP) Ports #6

gfcredera opened this issue Sep 12, 2024 · 0 comments

Comments

@gfcredera
Copy link
Collaborator

Description:

This feature implements test scenarios to validate network access between two hosts at the transport layer (TCP/UDP). Specifically, it ensures that hosts can connect to specified ports (e.g., 80, 8080, 443), and validates whether the connection is successful or unsuccessful. Additionally, it should confirm the application layer protocol (e.g., HTTP/HTTPS) running on those ports.

Example Scenario:

Scenario: Host A can connect to host B on TCP/UDP port 80, 8080, 443, 69
    Given host A
    When It connects to host B on port <port> using <transportProtocol>
    Then The connection is successful
    And The application layer protocol is <applicationProtocol>
    Examples:
        | port                  | transportProtocol | applicationProtocol |
        | 80                    | TCP               | HTTP                |
        | 8080                  | TCP               | HTTP                |
        | 443                   | TCP               | HTTPS               |
        | 69                    | UDP               | TFTP                |

Definition of Done:

  1. Write a feature file demonstrating the above scenarios.
  2. Implement the logic in StepDefinitions.kt to execute the feature file successfully, including:
    • Checking port connectivity (TCP/UDP).
    • Validating the application layer protocol running on the port (e.g., HTTP/HTTPS).

Relevant Information:

For TCP connectivity and protocol validation, the following methods can be used:

  1. telnet: Test TCP connectivity to a port.

    telnet remote-host 80

    Use to check if the port is open. Interact with the service to confirm the protocol.

  2. nc (Netcat): Versatile tool to test TCP/UDP connectivity and capture service banners.

    nc -v remote-host 80

    Useful for checking port status and capturing server responses.

  3. curl: Check if an HTTP service is running on the port.

    curl -I remote-host

    Retrieve HTTP headers to confirm protocol and server type.

  4. nmap: Identify the service running on the port.

    nmap -p 80 -sV remote-host

    Detects the application layer protocol and provides version information.

Tasks:

  1. Enable port connectivity testing for both TCP and UDP.
  2. Validate application layer protocols (e.g., HTTP, HTTPS).
  3. Update StepDefinitions.kt to support these scenarios.
  4. Write feature file examples for TCP/UDP connectivity and protocol validation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant