Ask a Question

Script code for Checkpoint validation

SOLVED
Arunachalam
Occasional Contributor

Script code for Checkpoint validation

Hi,

 

The output log of "aqobject.checkproperty" either success or failure log can be stored in any external excel file by using script code. If any Script is available to share it.

4 REPLIES 4
Wamboo
Community Hero

Hey,

 

What exactly do you want to do with the data in the file? must be excel? in which language do you write?

Arunachalam
Occasional Contributor

@Wamboo 

 

1. Our framework script in Javascript.

2. I need to store the log (which means success or failure ) into some excel sheet using the DDT driver method or any other method.

 

function storeLogInExternalFile(Object, Property, Condition, Value)) {
	
	var obj = {
		testItemName: Project.TestItems.Current.Name;
		testItemProperty: Property
		testItemValue: Value
		theValueIsCorrect : false;
	}
	
	(aqObject.CheckProperty(Object, Property, Condition, Value)) ? obj.theValueIsCorrect = true  : obj.theValueIsCorrect = false;
	
	let dataToExcel = JSON.stringify(obj);
	
	// put this data into file
}

or store data into long string and put it into one cell in excel and into another one the name of the test item.

Check in documentation that connection between TestComplete can accept JSON object as parameter. If yes you have good example.

TanyaYatskovska
SmartBear Alumni (Retired)

Thanks for the sample, @Wamboo!

 

@Arunachalam, is this what you were looking for?

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



cancel
Showing results for 
Search instead for 
Did you mean: