-
Notifications
You must be signed in to change notification settings - Fork 8
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
base: master
Are you sure you want to change the base?
Enriching export #16
Conversation
String timestamp = xmlDoc.@timestamp | ||
def solutions = getEnrichment().testCaseJsonParser(fileName) | ||
|
||
def filePath = Paths.get("src", "test", "groovy", fileName.toString().replace(".", File.separator) + ".groovy") |
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)) | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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() | ||
|
There was a problem hiding this comment.
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
gradle-test-export-plugin.iml
Outdated
@@ -0,0 +1,13 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
No description provided.