cancel
Showing results for 
Search instead for 
Did you mean: 

Generate GUID in script

SOLVED
Highlighted
Valued Contributor

Generate GUID in script

Hi,

 

I would like to assign to a variable in my script a GUID value.

Is this possible ?

 

Thanks in advance,

 

Mehdi

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Generate GUID in script

Hi Mehdi,

 

https://smartbear.com/blog/test-and-monitor/testcomplete-script-extensions-stringutils-object/ - does this help?

 

Also, if your environment contains .Net you may consider to use its functionality to generate GUIDs.

For example: https://docs.microsoft.com/en-us/dotnet/api/system.guid.newguid?view=netframework-4.8

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================

View solution in original post

8 REPLIES 8
Highlighted
Community Leader

Re: Generate GUID in script

Highlighted
Valued Contributor

Re: Generate GUID in script

Hello,

I took a look at it but I need to create GUIDs "broadcast" (I hope it makes sense...).

 

Highlighted
Community Leader

Re: Generate GUID in script

Can You describe Your idea more? maybe there is we can figure it out together.

Highlighted
Valued Contributor

Re: Generate GUID in script

Well, it's about the reporting of the tests results.

Actually, I send several mails. Each of them has a header and a body.

I want to change this and populate a database, with an asp.net interface.

I need to link by some way the table on which there is the header (test name, executable, version, passed, ...) with the table on which there will be the differences (it could be several text files).

So I imagined a guid that will be affected to the table which contains the header and the table which contains the files in difference.

What do you think about that ?

Thank you !

Highlighted
Community Hero

Re: Generate GUID in script

Hi,

 

What scripting language your test project is based on?

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Valued Contributor

Re: Generate GUID in script

Hi Alex,

Delphi script

Highlighted
Community Hero

Re: Generate GUID in script

Hi Mehdi,

 

https://smartbear.com/blog/test-and-monitor/testcomplete-script-extensions-stringutils-object/ - does this help?

 

Also, if your environment contains .Net you may consider to use its functionality to generate GUIDs.

For example: https://docs.microsoft.com/en-us/dotnet/api/system.guid.newguid?view=netframework-4.8

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================

View solution in original post

Highlighted
Valued Contributor

Re: Generate GUID in script

That's perfect Alex, thank you very much !