Description
This test case ensures that nmcli
can effectively list available Wi-Fi networks and establish a connection to a chosen network.
Setup
Ensure that NetworkManager
is installed and running on your Fedora system. Ensure the system has a Wi-Fi adapter and it's not connected to any Wi-Fi network to start with.
How to test
- Open a terminal.
- Execute the command
nmcli device wifi list
to list all available Wi-Fi networks. - Identify a Wi-Fi network you wish to connect to from the list, note down its SSID.
- Now, execute the command
nmcli device wifi connect [SSID] password [YOUR_WIFI_PASSWORD]
replacing[SSID]
with the actual SSID of the Wi-Fi network and[YOUR_WIFI_PASSWORD]
with the actual password. - Wait for a few seconds for the connection to be established.
Expected Results
- The command
nmcli device wifi list
returns a list of available Wi-Fi networks with details like SSID, signal strength, and security. - The chosen Wi-Fi network's SSID should be among the networks listed.
- The
nmcli device wifi connect ...
command should connect to the specified network and return a success message. - You can further verify the connection by executing
nmcli connection show --active
and ensuring that the chosen Wi-Fi network is listed as an active connection.
Optional
Optionally, after connecting, test data transmission by pinging an external server or browsing a webpage. Then, use nmcli
to disconnect and check other functionalities.