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

[QA] API test WebDav: unused stepDefinitions related to download with range #9520

Closed
prashant-gurung899 opened this issue Jul 3, 2024 · 6 comments
Assignees
Labels

Comments

@prashant-gurung899
Copy link
Contributor

prashant-gurung899 commented Jul 3, 2024

Description

/**
	 * @Then /^the downloaded content when downloading file "([^"]*)" for user "([^"]*)" with range "([^"]*)" should be "([^"]*)"$/
	 *
	 * @param string $fileSource
	 * @param string $user
	 * @param string $range
	 * @param string $content
	 *
	 * @return void
	 */
	public function downloadedContentWhenDownloadingForUserWithRangeShouldBe(
		string $fileSource,
		string $user,
		string $range,
		string $content
	):void {
		$user = $this->getActualUsername($user);
		$response = $this->downloadFileWithRange($user, $fileSource, $range);
		$this->checkDownloadedContentMatches($content, '', $response);
	}

Step definitions related to download with range in webDav.php are unused in any scenarios and one of them is shown above.
Investigate whether to keep the step defintions and add test coverage for it or remove the unused step definitions.

Similar case was in this issue : #9345

@phil-davis
Copy link
Contributor

Investigate whether to keep the step definitions and add test coverage for it or remove the unused step definitions.

It was a bit surprising to me that there are not any test scenarios in the current test suite that download parts of a file by range of bytes. The tests originally came from oC10, and range-requests are covered there. I suppose that ocis supports downloading just a range of bytes of a file?

Maybe there are some "range download" test scenarios left in the test suite.

Someone can check and report if there is still any coverage of "range download", and what is covered. Then we can decide if we need to extend coverage, or just delete the unused test step code.

@prashant-gurung899
Copy link
Contributor Author

prashant-gurung899 commented Jul 3, 2024

@phil-davis,
Yeah there are some "download with range" test scenarios in tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature

some of them are :

Scenario Outline: download a file with range
Scenario Outline: download a file with single part ranges
Scenario Outline: download a file with range out of bounds

There are more.

@SagarGi SagarGi added the QA:team label Jul 3, 2024
@prashant-gurung899
Copy link
Contributor Author

@phil-davis, Yeah there are some "download with range" test scenarios in tests/acceptance/features/coreApiWebdavOperations/downloadFile.feature

some of them are :

Scenario Outline: download a file with range
Scenario Outline: download a file with single part ranges
Scenario Outline: download a file with range out of bounds

There are more.

Other scenarios that i found related to download with range are :

Scenario Outline: download a file with multipart ranges
Scenario Outline: download a range at the end of a file 
Scenario Outline: download a file with last byte range out of bounds 

@phil-davis
Copy link
Contributor

Good - there is reasonable test coverage of range-downloads.

I just noticed that the example unused step definition is a "Then" step. It must have been used in some unusual scenarios.
I looked in oC10 core. Those steps are used in cliMain/transferOwnership.feature which tests the transfer-ownership CLI command in oC10. That does not exist in ocis.

So please go ahead and make a PR to delete the unused test step code.

@prashant-gurung899
Copy link
Contributor Author

@phil-davis Oh now i got why the step definitions were unused. I will delete those unused step definitions related to range download and push it in the same PR.
#9519

@prashant-gurung899 prashant-gurung899 changed the title [QA] API test WebDav: unused stepDefinitions [QA] API test WebDav: unused stepDefinitions related to download with range Jul 4, 2024
@prashant-gurung899 prashant-gurung899 self-assigned this Jul 4, 2024
@PrajwolAmatya
Copy link
Contributor

This issue has been fixed by this PR, #9519.
So, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants