From Fedora Project Wiki

Revision as of 10:40, 14 August 2023 by Sumantrom (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{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=

  1. Install a fresh version of Fedora.
  2. Install curl: sudo dnf install curl.

|actions=

  1. Fetch a basic web page: curl http://example.com.
  2. Fetch a web page and follow redirects: curl -L http://example.com.
  3. Fetch a web page with verbose output: curl -v http://example.com.
  4. Test a secured connection (e.g., HTTPS): curl https://example.com.
  5. Attempt to fetch a non-existent URL to test error handling: curl http://nonexistenturl.xyz.

|results=

  1. The curl command should fetch the content of the example.com homepage without errors.
  2. When using the -L flag, curl should follow redirects and display the final page content.
  3. The -v flag should provide verbose output, detailing the request and response process.
  4. The HTTPS request should be made without SSL errors.
  5. For the non-existent URL, curl should display an appropriate error message.

|optional=For extended testing:

  1. Use curl to fetch files from an FTP server if available.
  2. Test POST and other HTTP methods using curl.
  3. Examine manual pages for more commands and options: e.g., man curl.

}}