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

When ever a null value is sent to report. the report doesnot show any data in that testcase #13

Open
shivaprasad2634 opened this issue Dec 14, 2021 · 5 comments

Comments

@shivaprasad2634
Copy link

shivaprasad2634 commented Dec 14, 2021

More details. below is partial json .. please notice message is null

"subCheckPoints": [
{
"message": null,
"type": "Fail",
"screenshot": null,

@shivaprasad2634
Copy link
Author

shivaprasad2634 commented Dec 14, 2021

Full Json

{
"seleniumLog": [
{
"commandName": "createIC",
"args": [
"[${RecClsIC2}]"
],
"result": "fail",
"subLogs": [],
"duration": -1
},
{
"commandName": "Then Validate if the IC creation is successful",
"args": [
"[]"
],
"result": "Not Run",
"subLogs": [],
"duration": -1
}
],
"checkPoints": [
{
"message": "When Create an IC with data '${RecClsIC2}'",
"type": "TestStepFail",
"screenshot": "",
"duration": 4,
"threshold": 0,
"subCheckPoints": [
{
"message": null,
"type": "Fail",
"screenshot": null,
"duration": 0,
"threshold": 0,
"subCheckPoints": []
}
]
},
{
"message": "Then Validate if the IC creation is successful",
"type": "TestStep",
"screenshot": null,
"duration": 0,
"threshold": 0,
"subCheckPoints": []
}
],
"errorTrace": "java.lang.NullPointerException\n\tat .When Create an IC with data '${RecClsIC2}'(src/test/java/com/bayestree/sainapse/features/InfomationChannelTest.feature:10)\n\tat com.bayestree.sainapse.testDataManagement.SainapseDataBean.fillData(SainapseDataBean.java:222)\n\tat com.bayestree.sainapse.models.InformationChannel.map2InformationChannel(InformationChannel.java:773)\n\tat com.bayestree.sainapse.stepDefinitions.InformationChannelSteps.createIC_aroundBody0(InformationChannelSteps.java:22)\n\tat com.qmetry.qaf.automation.step.JavaStepReporter.javaTestStep(JavaStepReporter.java:93)\n\tat com.bayestree.sainapse.stepDefinitions.InformationChannelSteps.createIC(InformationChannelSteps.java:21)\n\tat com.qmetry.qaf.automation.step.JavaStep.doExecute(JavaStep.java:150)\n\tat com.qmetry.qaf.automation.step.BaseTestStep.execute(BaseTestStep.java:149)\n\tat com.qmetry.qaf.automation.step.StringTestStep.execute(StringTestStep.java:127)\n\tat com.qmetry.qaf.automation.step.client.Scenario.execute(Scenario.java:174)\n\tat com.qmetry.qaf.automation.step.client.DataDrivenScenario.scenario(DataDrivenScenario.java:66)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n"
}

@shivaprasad2634
Copy link
Author

shivaprasad2634 commented Dec 14, 2021

please make a generic fix to deal with any null value.. i am using LoggingBean to log my own commands to reports while working with apis to log request and response .. also i am injecting runtimeTest data into CURRENT_TEST_RESULT . so that i can see full picture of test data in report.. if any null values are sent .. then the report wont show any data for that . But current issue has occured when message is null, nothing related to my changes

@shivaprasad2634
Copy link
Author

made a temporary fix for now in qaf_dashboard.js

function escapHtml(str){
if (str == null){
str = "";
}
return str.replace(/<(?!(a |/a))/gi,"<");
}

in vkbeautify.0.99.00.beta.js

vkbeautify.prototype.xmlmin = function(text, preserveComments) {

var str = preserveComments ? text
						   : text.replace(/\<![ \r\n\t]*(--([^\-]|[\r\n]|-[^\-])*--[ \r\n\t]*)\>/g,"")
								 .replace(/[ \r\n\t]{1,}xmlns/g, ' xmlns');
if (str == null){
	str = "";
}
return  str.replace(/>\s{0,}</g,"><"); 

}

@cjayswal
Copy link
Contributor

You can try downloading latest dashboard it should not have such issue refer. If you find issue with latest dashboard feel free to reopen this issue with steps to reproduce.

@shivaprasad2634
Copy link
Author

This issue is there

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

No branches or pull requests

2 participants