Sorry Ganesh for the late reply. I was off work and didn't check back.
It turns out it didn't actually work. It seems the output I was looking at
was one from a manual comparison of the diff utility which I had done. I
just tried it again now and nothing actually happened.... I don't think
I've got the syntax correct yet. This is what I have:
Dim file_name
Dim Results
Dim PredictionLocation
Dim oShell
file_name = DataTable.Value("INPUT_FILE_NAME", dtGlobalSheet)
Results = "\\Server\share\Folder\Folder\Projects\Folder\Folder\Folder
\Results\" & file_name
PredictionLocation = "\\Server\share\Folder\Folder\Projects\Folder\Folder\
Folder\Results\PredictionData\" & file_name
Set oShell =CreateObject("WScript.Shell")
oShell.Run """C:\Apps\GnuWin32\bin\mydiff.bat"""&" -bBiu "& Results &" "&
PredictionLocation &""
I'm calling a batch file now instead of the actual diff.exe because it
seems I have another problem as well. My variables (Results and
PredictionLocation) don't seem to be translated. Rather than pass my file
locations it's been passed as a string. So I use the batch to be able to
see what is actually been passed.
It could very well be that it's my variables that is not allowing it to run
properly. Once I get the chance I'll remove the variables and hardcode the
file locations and see what happens.
On Thursday, 20 June 2013 17:26:09 UTC+2, Ganesh muralidharan wrote:
>
> cool what all changes did you make? Share your findings. It might help
> someone.
>
>
> On Thu, Jun 20, 2013 at 9:58 AM, <[email protected] <javascript:>> wrote:
>
>> Cheers Ganesh. I got it working!!
>>
>>
>> On Thursday, 20 June 2013 16:40:51 UTC+2, Ganesh muralidharan wrote:
>>
>>> syntax for 7z is as below
>>>
>>>
>>> Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]
>>> [<@listfiles...>]
>>>
>>> <Commands>
>>> a: Add files to archive
>>>
>>>
>>> On Thu, Jun 20, 2013 at 9:32 AM, <[email protected]> wrote:
>>>
>>>> Hi Ganesh,
>>>> Thanks for your piece of code. Could you please give me some
>>>> explanation on the syntax you've used (why the triple quotes for the
>>>> application. Why the ampersand before and after each variable. What does
>>>> the 'a' represent)?
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> On Thursday, 20 June 2013 14:51:21 UTC+2, Ganesh muralidharan wrote:
>>>>
>>>>> Please see if this article syntax helps.
>>>>> http://www.learnqtp.com/**forums**/Thread-Syntax-of-**SystemUtil-**Run<http://www.learnqtp.com/forums/Thread-Syntax-of-SystemUtil-Run>
>>>>>
>>>>> or you might have to try something like below which I used for running
>>>>> 7zip.
>>>>>
>>>>> Set oShell =CreateObject("WScript.Shell")
>>>>> oShell.Run """C:\Program Files\7-Zip\7z.exe"""&" a "& mvar1&"
>>>>> "&mvar2& " "& mvar3
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Jun 20, 2013 at 7:39 AM, <[email protected]> wrote:
>>>>>
>>>>>> Hi Everyone,
>>>>>> I'm hoping someone could give me some assistance or point me in the
>>>>>> right direction for a suitable solution. I have been given the task of
>>>>>> creating a regression test script for a none GUI Windows application.
>>>>>> Below
>>>>>> is a short summary of what the test process covers:
>>>>>> 1)Pick a file from network location.
>>>>>> 2)Pass file to the application for processing.
>>>>>> 3)Processing gives file(s) as output. This should be archived to a
>>>>>> specific network location.
>>>>>> 4)A comparison should be done between the outputted files and
>>>>>> previous version of the outputted files to ensure that content,
>>>>>> formatting
>>>>>> and other standards are still the same. The comparison results should
>>>>>> then
>>>>>> be stored to a network location.
>>>>>>
>>>>>> My problem is on number 4. I have tried to use the diff utility from
>>>>>> the command line but this doesn't seem to work. This is the line of code
>>>>>> that I wrote:
>>>>>> *
>>>>>> SystemUtil.Run "C:\Apps\GnuWin32\bin\diff.exe", -bBiux, Results &
>>>>>> PredictionLocation, "open"*
>>>>>>
>>>>>> Results and PredictionLocation are the variables which I have used
>>>>>> for the outputted files (Results) and the previous version
>>>>>> (PredictionLocation). -bBiux is the parameter to be passed to diff for
>>>>>> the
>>>>>> type of comparison which needs to be done. When I run this outside UFT
>>>>>> (commandline) it works fine but I'm thinking it has something to do with
>>>>>> the syntax for SystemUtil.Run. When I run this in UFT, nothing happens
>>>>>> (no
>>>>>> comparison is generated and no console is displayed showing the diff
>>>>>> processing).
>>>>>> I also thought about using the FileContent Checkpoint from UFT but I
>>>>>> don't think this will be ideal for multiply files (unless I'm missing
>>>>>> something). Any help will be very much appreciated.
>>>>>>
>>>>>> Cheers,
>>>>>> Ayo
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> "QTP - HP Quick Test Professional - Automated Software Testing"
>>>>>> group.
>>>>>> To post to this group, send email to [email protected]
>>>>>>
>>>>>> To unsubscribe from this group, send email to
>>>>>> MercuryQTP+...@**googlegroups.**com
>>>>>>
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/**group**/MercuryQTP?hl=en<http://groups.google.com/group/MercuryQTP?hl=en>
>>>>>>
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "QTP - HP Quick Test Professional - Automated Software Testing"
>>>>>> group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to mercuryqtp+...@**googlegroups.**com.
>>>>>>
>>>>>> For more options, visit
>>>>>> https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out>
>>>>>> .
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>>
>>>>>
>>>>> Ganesh Muralidharan
>>>>> 'God Never Forgets'
>>>>>
>>>> --
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> "QTP - HP Quick Test Professional - Automated Software Testing"
>>>> group.
>>>> To post to this group, send email to [email protected]
>>>> To unsubscribe from this group, send email to
>>>> MercuryQTP+...@**googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/**group/MercuryQTP?hl=en<http://groups.google.com/group/MercuryQTP?hl=en>
>>>>
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "QTP - HP Quick Test Professional - Automated Software Testing"
>>>> group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to mercuryqtp+...@**googlegroups.com.
>>>> For more options, visit
>>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>>
>>>
>>> Ganesh Muralidharan
>>> 'God Never Forgets'
>>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "QTP - HP Quick Test Professional - Automated Software Testing" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Regards,
>
>
> Ganesh Muralidharan
> 'God Never Forgets'
>
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.