From Fedora Project Wiki
(Created page with "{QA/Test_Case |description=This test case ensures the correct functioning of `curl`, which is a command-line tool for transferring data with URL syntax, supporting a range of protocols such as HTTP, HTTPS, FTP, and more. |setup= # Install a fresh version of Fedora. # Install `curl`: `sudo dnf install curl`. |actions= # Fetch a basic web page: `curl http://example.com`. # Fetch a web page and follow redirects: `curl -L http://example.com`. # Fetch a web page with verbose...") |
No edit summary |
||
Line 1: | Line 1: | ||
{QA/Test_Case | {{QA/Test_Case | ||
|description=This test case ensures the correct functioning of `curl`, which is a command-line tool for transferring data with URL syntax, supporting a range of protocols such as HTTP, HTTPS, FTP, and more. | |description=This test case ensures the correct functioning of `curl`, which is a command-line tool for transferring data with URL syntax, supporting a range of protocols such as HTTP, HTTPS, FTP, and more. | ||
|setup= | |setup= |
Latest revision as of 10:40, 14 August 2023
Description
This test case ensures the correct functioning of curl
, which is a command-line tool for transferring data with URL syntax, supporting a range of protocols such as HTTP, HTTPS, FTP, and more.
Setup
- Install a fresh version of Fedora.
- Install
curl
:sudo dnf install curl
.
How to test
- Fetch a basic web page:
curl http://example.com
. - Fetch a web page and follow redirects:
curl -L http://example.com
. - Fetch a web page with verbose output:
curl -v http://example.com
. - Test a secured connection (e.g., HTTPS):
curl https://example.com
. - Attempt to fetch a non-existent URL to test error handling:
curl http://nonexistenturl.xyz
.
Expected Results
- The
curl
command should fetch the content of theexample.com
homepage without errors. - When using the
-L
flag, curl should follow redirects and display the final page content. - The
-v
flag should provide verbose output, detailing the request and response process. - The HTTPS request should be made without SSL errors.
- For the non-existent URL, curl should display an appropriate error message.
Optional
For extended testing:
- Use curl to fetch files from an FTP server if available.
- Test POST and other HTTP methods using curl.
- Examine manual pages for more commands and options: e.g.,
man curl
.