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

Enriching export #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Enriching export #16

wants to merge 4 commits into from

Conversation

owaiskerney
Copy link

No description provided.

String timestamp = xmlDoc.@timestamp
def solutions = getEnrichment().testCaseJsonParser(fileName)

def filePath = Paths.get("src", "test", "groovy", fileName.toString().replace(".", File.separator) + ".groovy")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test are not necessary in groovy but it could be kotlin, java, etc

String id = sha1Hashed(it.getClassname() + it.getName() + it.timestamp)
IndexRequest indexObj = new IndexRequest(index, typeFinal, id)
processor.add(indexObj.source(output, XContentType.JSON))
}
}

def InputJSONFile = getEnrichment().featureJsonParser('getFeatureJsonFile')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be in camel case

String id = sha1Hashed(it.getClassname() + it.getName() + it.timestamp)
IndexRequest indexObj = new IndexRequest(index, typeFinal, id)
processor.add(indexObj.source(output, XContentType.JSON))
}
}

def InputJSONFile = getEnrichment().featureJsonParser('getFeatureJsonFile')
def InputJSON = getEnrichment().featureJsonParser('getFeatureJsonParseText')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same


xmlDoc.children().each {
if (it.name() == "testcase") {
Result result = parseTestCase(it)
Result result = parseTestCase(it,solutions)
result.timestamp = timestamp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove the timestamp here, instead of done in TestExportTask

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the timestamp here as it is used to create the elastic search index later for each test case.

IndexRequest indexObjFeature = new IndexRequest(indexFeature, typeFinal, id)
object.productName= getProperties().product.name
processor.add(indexObjFeature.source(object, XContentType.JSON))
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part should not be done in here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but the internal one

result.properties = resolveProperties(p)
result.projectName= project.getName()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, it should be done in enrichment
I can work with you to see how it can be done

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't have to commit this file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noted


@Input
@Optional
def featureExport
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can add another task instead of export using a closure

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in a new FeatureExportTask class inside the project that just prompts the ullink plugin to export the feature?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a new task depends on this task, exporting the feature is ok

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

Successfully merging this pull request may close these issues.

2 participants