Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Commit b8df49b

Browse files
mrrajanRajan Ravi
andauthored
Adding License export feature files (#8)
Signed-off-by: Rajan Ravi <rravi@rravi-thinkpadp1gen4i.bengluru.csb> Co-authored-by: Rajan Ravi <rravi@rravi-thinkpadp1gen4i.bengluru.csb>
1 parent d50a3ed commit b8df49b

File tree

2 files changed

+149
-0
lines changed

2 files changed

+149
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
2+
Feature: License Explorer
3+
As a Platform Eng
4+
I want to be able to download the licenses in a CSV file format from a specific SBOM
5+
6+
Background:
7+
Given User is on TPA Application
8+
And User successfully uploaded a CycloneDX SBOM from Upload SBOM page
9+
And Uploaded CycloneDX SBOM appears on Search List page under SBOMs tab
10+
11+
Scenario: Verify Download Licences option on SBOM Search Results page for CycloneDX SBOM
12+
Given User Searches for CycloneDX SBOM using Search Text box and Navigates to Search results page
13+
When User Selects CycloneDX SBOM of interest from the Search Results
14+
And User Clicks "Action" button
15+
Then "Download Licences" Option should be visible
16+
17+
Scenario: User Downloads license information for CycloneDX SBOM from SBOM Search Results page
18+
Given User Searches for CycloneDX SBOM using Search Text box and Navigates to Search results page
19+
When User Selects CycloneDX SBOM of interest from the Search Results
20+
And User Clicks "Action" button
21+
And Selects "Download Licences" option
22+
Then Licenses associated with the SBOM should be downloaded in ZIP format using the SBOM name
23+
24+
Scenario: Verify Download Licences option on SBOM Explorer page for CycloneDX SBOM
25+
Given User Searches for CycloneDX SBOM using Search Text box and Navigates to Search results page
26+
When User Selects CycloneDX SBOM of interest from the Search Results
27+
And User Clicks on SBOM name hyperlink from the Search Results
28+
Then Application Navigates to SBOM Explorer page
29+
And "Download Licences" Option should be visible
30+
31+
Scenario: User Downloads license information for CycloneDX SBOM from SBOM Explorer page
32+
Given User is on SBOM Explorer page for the CycloneDX SBOM
33+
And User Clicks on "Download Licences" button
34+
Then Licenses associated with the SBOM should be downloaded in ZIP format using the SBOM name
35+
36+
Scenario: Verify the files on downloaded CycloneDX SBOM license ZIP
37+
Given User has Downloaded the License information for CycloneDX SBOM
38+
When User extracts the Downloaded license ZIP file
39+
Then Extracted files should contain two CSVs, one for Package License combination and another one for License reference
40+
41+
Scenario: Verify the headers on CycloneDX SBOM package License CSV file
42+
Given User extracted the CycloneDX SBOM license compressed file
43+
When User Opens the package license combination file
44+
Then The file should have the following headers - name, namespace, group, version, package, reference license,license name and alternate package reference
45+
46+
Scenario: Verify the headers on CycloneDX SBOM License reference CSV file
47+
Given User extracted the CycloneDX SBOM license compressed file
48+
When User Opens the license reference file
49+
Then The file should have the following headers - licenseId, name, extracted text and comment
50+
51+
Scenario: Verify the license information for a package on the CycloneDX SBOM with single license
52+
Given User is on package license combination file
53+
When User selects a package with Single license information
54+
Then name column should contain the value of component.name field from SBOM json
55+
And namespace column should be empty
56+
And group column should contain the value of component.group field from SBOM json
57+
And version column should contain the value of component.version field from SBOM json
58+
And package reference column should contain the value of components.purl from SBOM json
59+
And license column should contain the value of components.license.id field from SBOM json
60+
And license name column should contain the value of components.license.name field from SBOM json
61+
And alternate package reference column should be empty
62+
63+
Scenario: Verify the license information for a package on the CycloneDX SBOM with multiple licenses
64+
Given User is on package license combination file
65+
When User selects a package with multiple license information
66+
Then Package should have Rows equivalent to number of licenses
67+
And All the package rows should be loaded with identical values for the columns name, namespace, group, version, package
68+
And License column should be loaded with the unique licenses of the package from SBOM json
69+
70+
Scenario: Verify the contents on CycloneDX SBOM license reference CSV file
71+
Given User is on license reference file
72+
When User selects a license from the list of licenses
73+
Then The License reference CSV should be empty
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
2+
Feature: License Explorer
3+
As a Platform Eng
4+
I want to be able to download the licenses in a CSV file format from a specific SBOM
5+
6+
Background:
7+
Given User is on TPA Application
8+
And User has successfully uploaded a SPDX SBOM from Upload SBOM page
9+
And Uploaded SPDX SBOM appears on Search List page under SBOMs tab
10+
11+
Scenario: Verify Download Licences option on SBOM Search Results page for SPDX SBOM
12+
Given User Searches for SPDX SBOM using Search Text box and Navigates to Search results page
13+
When User Selects SPDX SBOM of interest from the Search Results
14+
And User Clicks "Action" button
15+
Then "Download Licences" Option should be visible
16+
17+
Scenario: User Downloads license information for SPDX SBOM from SBOM Search Results page
18+
Given User Searches for SPDX SBOM using Search Text box and Navigates to Search results page
19+
When User Selects SPDX SBOM of interest from the Search Results
20+
And User Clicks "Action" button
21+
And Selects "Download Licences" option
22+
Then Licenses associated with the SBOM should be downloaded in ZIP format using the SBOM name
23+
24+
Scenario: Verify Download Licences option on SBOM Explorer page for SPDX SBOM
25+
Given User Searches for SPDX SBOM using Search Text box and Navigates to Search results page
26+
When User Selects SPDX SBOM of interest from the Search Results
27+
And User Clicks on SBOM name hyperlink from the Search Results
28+
Then Application Navigates to SBOM Explorer page
29+
And "Download Licences" Option should be visible
30+
31+
Scenario: User Downloads license information for SPDX SBOM from SBOM Explorer page
32+
Given User is on SBOM Explorer page for the SPDX SBOM
33+
And User Clicks on "Download Licences" button
34+
Then Licenses associated with the SBOM should be downloaded in ZIP format using the SBOM name
35+
36+
Scenario: Verify the files on downloaded SPDX SBOM license ZIP
37+
Given User has Downloaded the License information for SPDX SBOM
38+
When User extracts the Downloaded license ZIP file
39+
Then Extracted files should contain two CSVs, one for Package License combination and another one for License reference
40+
41+
Scenario: Verify the headers on SPDX SBOM package License CSV file
42+
Given User extracted the SPDX SBOM license compressed file
43+
When User Opens the package license combination file
44+
Then The file should have the following headers - name, namespace, group, version, package, reference license,license name and alternate package reference
45+
46+
Scenario: Verify the headers on SPDX SBOM License reference CSV file
47+
Given User extracted the SPDX SBOM license compressed file
48+
When User Opens the license reference file
49+
Then The file should have the following headers - licenseId, name, extracted text and comment
50+
51+
Scenario: Verify the license information for a package with single license
52+
Given User is on package license combination file
53+
When User selects a package with Single license information
54+
Then name column should contain the value of name field from SBOM json
55+
And namespace column should contain the value of documentNamespace field from SBOM json
56+
And group column should be empty
57+
And version column should be empty
58+
And package reference column should contain the value of packages.externalRefs.referenceLocator field for purl referenceType from SBOM json
59+
And license column should contain the value of packages.licenseDeclared field from SBOM json
60+
And license name column should be populated in reference to license reference CSV file
61+
And alternate package reference column should contain the arrays of values of packages.externalRefs.referenceLocator field for referenceType other than purl
62+
63+
Scenario: Verify the license information for a package with multiple licenses
64+
Given User is on package license combination file
65+
When User selects a package with multiple license information
66+
Then Package should have Rows equivalent to number of licenses
67+
And All the package rows should be loaded with identical values for the columns name, namespace, group, version, package
68+
And License column should be loaded with the unique licenses of the package from SBOM json
69+
70+
Scenario: Verify the contents on SPDX SBOM license reference CSV file
71+
Given User is on license reference file
72+
When User selects a license from the list of licenses
73+
Then The unique values of licenceDeclared field from SPDX SBOM file should be listed
74+
And licenseId column should be loaded with unique license id
75+
And license column should be loaded with the name of the license
76+
And extracted text and comment columns should be loaded in reference to the template file

0 commit comments

Comments
 (0)