Skip to content

Commit

Permalink
add the calssification catagory of test case (farEdge Telco NonTelco) (
Browse files Browse the repository at this point in the history
…#82)

* add the calssification catagory of test case (farEdge Telco NonTelco)

* Update pkg/claim/catalog.go

Co-authored-by: Brandon Palm <[email protected]>

* Update pkg/claim/catalog.go

Co-authored-by: Brandon Palm <[email protected]>

* Update pkg/claim/catalog.go

Co-authored-by: Brandon Palm <[email protected]>

* Update pkg/claim/catalog.go

Co-authored-by: Brandon Palm <[email protected]>

* update the commit with brandon comments

* update the commit with brandon comments

---------

Co-authored-by: Brandon Palm <[email protected]>
  • Loading branch information
aabughosh and sebrandon1 authored Mar 20, 2023
1 parent b13e0ca commit 66b8408
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion pkg/claim/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ import (
"strings"
)

/*
{
"ForTelco": "Mandatory",
"FarEdge" : "Optional",
"ForNonTelco": "Optional",
"ForVZ": "Mandatory"
}*/
// struct for classification
type CategoryClassification struct {
FarEdge string
Telco string
NonTelco string
Extended string
}

// TestCaseDescription describes a JUnit test case.
type TestCaseDescription struct {
// Identifier is the unique test identifier.
Expand All @@ -41,13 +56,15 @@ type TestCaseDescription struct {

// Whether or not automated tests exist for the test case. Not to be rendered.
Qe bool `json:"qe" yaml:"qe"`
// classification for each test case
Categoryclassification CategoryClassification `json:"Categoryclassification" yaml:"Categoryclassification"`
}

func formTestTags(tags ...string) string {
return strings.Join(tags, ",")
}

func BuildTestCaseDescription(testID, suiteName, description, remediation, testType, exception, reference string, qe bool, tags ...string) (TestCaseDescription, Identifier) {
func BuildTestCaseDescription(testID, suiteName, description, remediation, testType, exception, reference string, qe bool, categoryclassification CategoryClassification, tags ...string) (TestCaseDescription, Identifier) {
aID := Identifier{
Tags: formTestTags(tags...),
Id: suiteName + "-" + testID,
Expand All @@ -62,5 +79,6 @@ func BuildTestCaseDescription(testID, suiteName, description, remediation, testT
aTCDescription.BestPracticeReference = reference
aTCDescription.Tags = strings.Join(tags, ",")
aTCDescription.Qe = qe
aTCDescription.Categoryclassification = categoryclassification
return aTCDescription, aID
}

0 comments on commit 66b8408

Please sign in to comment.