Ask a Question

How to use Log message as variable in Keyword test?

SOLVED
sukhsagar
New Contributor

How to use Log message as variable in Keyword test?

Hi all,

 

Well i am trying to get the log results into the varibles to perform my keyword test, as these log results are form the script which is generating the random numbers form a csv file and i want to use these number for my keyword test to perform an automation test. it would be great if someone will guide me.

 

Thanks in advance.

6 REPLIES 6
AlexKaras
Champion Level 3

Hi,

 

I am not sure that I got your description...

Can you provide an example, please?

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================

Hi @AlexKaras ,

 

Thank you for writing back, well i am performing a test where i need random numbers from csv file to execute the test. I am already done with the keyword test and the script to get the random numbers but as the script is giving these random numbers in result log so i need to use these result logs as variables to perform the keyword test. I would like to know if it is possible to make the result logs as variables to perform the test or it cannot be done.

 

looking to hear from you.

 

Hi,

 

While you should be able to write a code that parses log file and extracts the number from it, but why not to use the (temporary) Project Variable and use it to keep and transfer the needed value between tests?

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================

Hello again,

 

It would be great if you would let me know about how to use the temporary project variable.

 

 

Best regards

There is an good article on how to use Variables

 

https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/common/variables-page...

 

Please let me know in case you need anything else.

sonya_m
SmartBear Alumni (Retired)

Thank you, Community! Awesome job here.

 

@sukhsagar was the article provided helpful to you?


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: