Agent SVN and TestComplete

Get help with the installation and running of the Agent Git or Agent SVN plug-ins. This section can also be used for posting comments, suggestions or submitting feature requests. Please do not post bug reports here. When in doubt post your question here.
ervkam
Posts: 1
Joined: Wed Nov 02, 2011 8:59 am

Agent SVN and TestComplete

Post by ervkam »

I am using a software called TestComplete when I am trying to add my project from TestComplete with help from SVNAGent I get a pop-up "Agent SVN Project binding details" and pushes the "List" button besides the project I get the following screen:

-------------------------------------------------------------------------
Projects in Repository: file:///C:/SVN_repository/SVNProject
-------------------------------------------------------------------------
1 mattkz okt 31 14:26 ./
1 mattkz okt 31 14:26 branches/
1 mattkz okt 31 14:26 tags/
1 mattkz okt 31 14:26 trunk/


-------------------------------------------------------------------------
Fully Qualified Project Locations
-------------------------------------------------------------------------
If the projects above where imported into the repository using
the 'trunk' postfix naming convention then the locations of these
projects need to include the trunk postfix details in order to
fully qualify the name.

Here is an example of a fully qualified project location:

1 mattkz okt 31 14:26 branches/trunk/


I have tried a lot of combinations in order to define my project but I have failed. What shall I answer ?

/karin
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Hi Karin,

To test this out I created the following SVN repository:

Code: Select all

 Directory of c:\SVN_Repository

03/11/2011  10:28 AM    <DIR>          .
03/11/2011  10:28 AM    <DIR>          ..
03/11/2011  10:28 AM    <DIR>          conf
03/11/2011  10:33 AM    <DIR>          db
03/11/2011  10:28 AM                 2 format
03/11/2011  10:28 AM    <DIR>          hooks
03/11/2011  10:28 AM    <DIR>          locks
03/11/2011  10:28 AM               234 README.txt
I then created the following test project:

Code: Select all

Directory of c:\projects\SVNProject

03/11/2011  10:31 AM    <DIR>          .
03/11/2011  10:31 AM    <DIR>          ..
03/11/2011  10:33 AM               496 file1.txt
03/11/2011  10:29 AM               396 file2.txt
03/11/2011  10:29 AM               112 file3.txt
03/11/2011  10:32 AM             3,977 SVNProject.zpi
03/11/2011  10:32 AM               289 SVNProject.zwi
I then used Zeus to import the project into the Subversion repository. and after the import this was the repository listing looked like:

Code: Select all

-------------------------------------------------------------------------
     Projects in Repository: file:///C:/SVN_repository
-------------------------------------------------------------------------
      3 jussij                Nov 03 10:39 ./
      3 jussij                Nov 03 10:39 SVNProject/


-------------------------------------------------------------------------
Fully Qualified Project Locations
-------------------------------------------------------------------------
If the projects above where imported into the repository using
the 'trunk' postfix naming convention then the locations of these
projects need to include the trunk postfix details in order to
fully qualify the name.

Here is an example of a fully qualified project location:

      3 jussij                Nov 03 10:39 SVNProject/trunk/

Code: Select all

 Directory of c:\projects\SVNProject

03/11/2011  10:31 AM    <DIR>          .
03/11/2011  10:31 AM    <DIR>          ..
03/11/2011  10:33 AM                   .svn
03/11/2011  10:33 AM               496 file1.txt
03/11/2011  10:29 AM               396 file2.txt
03/11/2011  10:29 AM               112 file3.txt
03/11/2011  10:32 AM             3,977 SVNProject.zpi
03/11/2011  10:32 AM               289 SVNProject.zwi
To bind to the project in Zeus I use the same bind Agent SVN dialog and these are the details I entered:

Code: Select all

   Project: SVNProject/trunk/
Local Path: C:\projects
But notice I set the repostitory path to be this:

Code: Select all

C:/SVN_Repository
whereas you set it to be this:

Code: Select all

C:/SVN_Repository/SVNProject
If I use the AUX Path button found in the Agent SVN bind dialog and set it to C:/SVN_Repository/SVNProject then my project list becomes this:

Code: Select all

-------------------------------------------------------------------------
     Projects in Repository: file:///C:/SVN_Repository/SVNProject
-------------------------------------------------------------------------
      1 jussij                Nov 03 10:51 ./
      1 jussij                Nov 03 10:51 trunk/


-------------------------------------------------------------------------
Fully Qualified Project Locations
-------------------------------------------------------------------------
If the projects above where imported into the repository using
the 'trunk' postfix naming convention then the locations of these
projects need to include the trunk postfix details in order to
fully qualify the name.

Here is an example of a fully qualified project location:

      1 jussij                Nov 03 10:51 trunk/trunk/
So I think to get you binding to work you need to do the following:

(1) Bring up the Agent SVN bind dialog

(2) Use the AUX Path button and set the repository to be the root folder location so in your case it becomes this:

Code: Select all

C:/SVN_Repository
(3) Change the other binding details to be:

Code: Select all

   Project: SVNProject/trunk/
Local Path: C:\projects
Cheers Jussi
hmosley
Posts: 9
Joined: Tue Apr 10, 2012 1:45 pm

Post by hmosley »

I am interested in this topic, for my small group uses TestComplete. We inherited TortoiseSVN connecting to Subversion 1.6.6 on a Linux server. TortoiseSVN and TestComplete are NOT compatible, but TesatConplete advertises to be compatible with any MSSCCI compatible client. We have tried an evaluation copy of TamTam, but have not had success.

Your AgentSVN seems to be geared toward Microsfot products and windows repository. I was lost trying to determine how to enter aux path, project name, etc. in our environment?

Have you had any other users with success using your AgentSVN connecting to a LInux server repository?

Thanks.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

TestComplete advertises to be compatible with any MSSCCI compatible client.
This means that it should work or at least that it can be made to work.

With your help I'm more than happy to try and make this work.
I was lost trying to determine how to enter aux path, project name, etc. in our environment?
One of the problems with the MSSCCI is it does'nt define the user interface.

So all IDEs seem to have a different set of GUIs.

But I am going to assume TestComplete works in a similar way to Microsoft tools.

If this is the case this is what I would suggest.

(1) Use the AgentSVN configuration utility and setup the AgentSVN as follows:

http://www.zeusedit.com/agent/ssms/imag ... re_svn.png

This will use the local folder as the location for the SVN repository.

(2) Also turn on the help debug option from the previous step.

(3) If you then see this message box:

Code: Select all

The following Subversion components where not found in the PATH of the local machine:

    svnadmin.exe
    svn.exe

For this software to work these Subversion components need to have been installed...
This means Agent SVN can't find subversion on you local machine.

These are the SVN command line tools and to fix this you will need to download an installer for these components from this location:

http://sourceforge.net/projects/win32svn

(4) Next create a new TestComplete project.

Then try to add that project to the local SVN repository created earlier using some sort of Add to Source control menu.

If the add step works you should see the project in the local SVN repository.

(5) The final step would be a bind process.

In the Microsoft world this bind process looks like this:

http://www.zeusedit.com/agent/ssms/imag ... mplete.png
Have you had any other users with success using your AgentSVN connecting to a LInux server repository?
AgentSVN connects to the repository using the svn.exe command line tool so it should be able to connect to any SVN repository.

But the tricky part is first making sure it actually works with TestComplete :?:

That is why I would recommend first starting with a very simple local repository as shown above.

Once it has been shown that TestComplete works with a local SVN repository it should be very easy to point it to a remote repository.

Cheers Jussi
Last edited by jussij on Tue Apr 10, 2012 3:41 pm, edited 1 time in total.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

From karin orignal post it appears like he could actually see the repository from inside TestComplete via AgentSVN which means it was probably close to working.

But unfortuately with no access to TestComplete at this end it is hard to test this and unfortunately karin did no reply to my post :(

So if you follow the steps above and run into trouble could you please send me the log file produced via an e-mail (see the e-mail button below).

Cheers Jussi
hmosley
Posts: 9
Joined: Tue Apr 10, 2012 1:45 pm

Post by hmosley »

Am trying to set up my local repository using your directions. I do not know how this will work with Linux server accessing myt local disk for a trial repository.

I also see the SVN Ignore section, to which I am trying to add specific TestComplete files. THe TestComplete execution log files are in a */Log directory. The log names are in the form "m_d_2012_h_m xM_ss_ms", where m = 1 or 2 digit month
d = 1 or 2 digit day
h = 1 or 2 minute hour
m = 1 or 2 digit minute
ss = 1 or 2 digit second
ms = 1-3 digit milliseconds

Can this accept wildcards in the form of a regular expression, like
"*_2012_* [AP]M_*"?

Thanks.
hmosley
Posts: 9
Joined: Tue Apr 10, 2012 1:45 pm

Post by hmosley »

From my prior post, I thought I could remove that regular expression later if I need to. I provided AgentsSVN with the folder C:\QA_SC_Repository, which was empty. When I brought up TestComplete using an old project NOT on my local system, TestComplete saw AgentSVN and brought me to the Project Binding Details screen.
The project field is empty, and List says there are 0 projects.
The AUX Path field contains "file:///C:/QA_SC_Repository".
The Local Pathcontains "Y:\resetEMDS_1" (the TestComplete project)/

Apparently I need to populate the "C:\QA_SC_Repository" somehow?
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Am trying to set up my local repository using your directions.
AgentSVN will create the local repository.

This process should be as simple as selecting the file protocol and select a local repository folder.

http://www.zeusedit.com/agent/ssms/imag ... re_svn.png

If this does not create a local repository then here is the first problem :?:
I do not know how this will work with Linux server accessing my local disk for a trial repository.
I'm now a little confused :?

If you look at the PowerBuilder example, the SSMS example or the Visual C++ and Visual Studio examples in the AgentSVN help file you will see a pattern.

All these example try to do is try to test if AgentSVN, the IDE and Subversion can work together.

They do this by using the simplest possible configuration model which is a local SVN repository using the file protocol.

So to check to see if TestComplete works with AgentSVN and Subversion the simplest possible test should likewise be:

1) Configure AgentSVN to use a simple local file protocol SVN repository
2) Make sure that AgentSVN created that local file repository (something like c:\projects\repository\)
3) Connect TestComplete to AgentSVN
4) Create a simple local file project in TestComplete (something like c:\projects\MyTest\)
5) Try to add that c:\projects\MyTest\ project to SVN repository using the AgentSVN Import Wizard.
6) Make sure the TestComplete c:\projects\MyTest\ project is bound to that repository
7) Now see if I can check add/check out/check in/revert files in that c:\projects\MyTest\ test project

These are basically the same steps that I outlined earlier.

Unless I am missing something, for this simple test there should be no Linux server involved at all.

Once the test is complete and has proven to work it should be very easy to just re-point the SVN repository.

Now I have never used TestComplete so I might be wrong in all of this, but this is what I would be expecting to see.
The TestComplete execution log files are in a */Log directory.
I would leave the file ignore filters for now.

Because inside the import Wizard itself (which shows when you try to add a project to the repository) there is an additional option to ignore folders.

So at this step of the process you can just ignore the entire Log folder.
Can this accept wildcards in the form of a regular expression
These ignore filters are used by the svn.exe command line tool itself.

I have never looked how the svn.exe uses these filters but I suspect they are standard command line file filters (not regular expressions).
When I brought up TestComplete using an old project NOT on my local system
I would much prefer that you create a new local repository using the AgentSVN configuration tool.

Here is why.

1) The AgentSVN uses the Subversion svn.exe utility: http://sourceforge.net/projects/win32svn

2) This svn.exe utility has to be installed for AgentSVN to work.

3) If your test repository is not at the same version number as the svn.exe utility it is not going to work.

4) If your test repository has been permissioned with security settings then you won't be able to connect to that repository until you setup the correct user profiles.

And the list goes on. But if you create the local repository it is guaranteed to work :)
TestComplete saw AgentSVN and brought me to the Project Binding Details screen.
This is good. It is a sign that TestComplete is in fact MSSCCI compliant :)

What you are seeing is the binding dialog. This lets you bind a project to a SVN repository.
The project field is empty, and List says there are 0 projects.
What does the List button show when you click it.

It should list the projects/folder/files in that repository.
The Local Path contains "Y:\resetEMDS_1" (the TestComplete project)
Why is your working copy set to this Y:\ drive location :?:

This looks like a server folder location, not a local folder location.

Once again if you don't have read/write access to this folder it is not going to work.

I would expect that local working copy be on your local machine.

I would expect this to be something more like this:

Code: Select all

c:\projects\resetEMDS_1
where resetEMDS_1 is the project name.

Code: Select all

Apparently I need to populate the "C:\QA_SC_Repository" somehow?
The when you add a project to the SVN repository using the AgentSVN from inside the IDE the AgentSVN Import Wizard will do this for you.

To just see if TestComplete is going to work with AgentSVN I would highly recommed you try steps 1) through steps 7) above on a local machine using new local repository using the file protocol.

Then as soon as any one of those steps fails just send me the log file.

NOTE: You can access the log file using the AgneSVN Configuration utility.

Cheers Jussi
hmosley
Posts: 9
Joined: Tue Apr 10, 2012 1:45 pm

Post by hmosley »

First my apologies for the confusion. I have never posted anything using a forum like this (I probably have underwear older than you).

You referred to the PowerBuilder example, which said

[quote]For Agent SVN to work correctly requires Agent SVN, Subversion and Microsoft SQL Server Management Studio all to be installed and configured correctly[/quote]

I have no Subversion anywhere except on a Linux server. Do I need to get and install a local version on my Windows 7 system?

In the directory I created on my C: drive (C:\QA_SC_Repository) I see folders conf, db, hooks, and locks, as well as README.txt and a format file. I see nothing about any TestComplete project. Has the local repository has been created?

I navigated and executed the Agent SVN Configuration from the Start menu. The SVN Project Manager field was left blank, I enter "C:\QA_SC_Repository" in the Folder field, and "C:\program files\collabnet\subversion client\diff.exe" "$f1" "$f2" in the Command line field, and the protocol field was set to "Local File(file://)". I already described my entries in the SVN Ignore field.

[quote] If your test repository is not at the same version number as the svn.exe utility it is not going to work.[/quote]

The svn.exe we obtained from CollabNet and it is version 1.7.4. The subversion version is 1.6.6, according to the server admin.

Given those details, I opened an existing TestComplete project from my Y: drive, that I want to put inot my new repository C:\QA_SC_Repository.
Using TestComplete:
[list]Select File->Source Control->Add Project Suite, which brings up the Select SCC Provider dialog.
Select AgentSVN and select OK, which brings up the "Agent SVN - Project Binding Details" window.
Select List button, and the "Agent SVN - Repository Tree" says projects in repository is 0. (This is what prompted my question Do I need to populate this somehow).
[/list]

At this point I do not know what to enter in the fields. The List is empty, and complains about that. I entered "HRM_AgentSVN_Smoke/trunk/" and a popup said the project does not exist in the repository. I entered "C:\HRM_TestSVN_Working" in the Local Path field.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

I probably have underwear older than you.
Don't bet on it. I myself have been in the programming game for over two decades ;)
I have no Subversion anywhere except on a Linux server.
On your Linux server you have will be running a Subversion server.

On you local machine you will be connecting to this Subversion server using a Subversion client.

In your case the Subversion client is most probably TortoiseSVN but it is still a client.

In the case of AgentSVN, it connects to the server using the svn.exe Subversion client.
Do I need to get and install a local version on my Windows 7 system?
Yes.

This link contains the Subversion client installer: http://sourceforge.net/projects/win32svn

Now what might be creating some confusion is the svn.exe has a bit of a split personality.

The svn.exe is a client but it can also connect to a file protocol SVN repository without needing a Subversion server.

In other words by creating a local machine repository using the file protocol, means you can basically run Subversion without needing a full blown Subversion server.

This is one of the reasons I suggest doing all the initial testing with this type of setup.
In the directory I created on my C: drive (C:\QA_SC_Repository) I see folders conf, db, hooks, and locks, as well as README.txt and a format file.
Did you create this usg the AgentSVN Configuration Utility.

The AgentSVN does not actually create the SVN repository, but instead it uses the svnadmin.exe tool that comes as part of the Subversion client installer mentioned above.
Has the local repository has been created?
If you did create the repository using the AgentSVN Configuration Utility then you will now have an empty SVN repository.

If you did not, then just delete the repository and use the AgentSVN Configuration Utility to create the repository.
I navigated and executed the Agent SVN Configuration from the Start menu.
That is the tool I am talking about.
The SVN Project Manager field was left blank, I enter "C:\QA_SC_Repository" in the Folder field, and "C:\program files\collabnet\subversion client\diff.exe" "$f1" "$f2" in the Command line field, and the protocol field was set to "Local File(file://)". I already described my entries in the SVN Ignore field.
That sounds perfect.

Now if you delete the C:\QA_SC_Repository folder then open up the Configuration Utility it will create a new repository for you.
The svn.exe we obtained from CollabNet and it is version 1.7.4. The subversion version is 1.6.6, according to the server admin.
This may well cause issues.

If CollabNet changed the database schema between these two version then that client will not work with that server.

But using the local test described above, that will not matter at this time since you will not be going anywhere near that Linux repository.

You will be talking to your local repository.
Given those details, I opened an existing TestComplete project from my Y: drive, that I want to put inot my new repository C:\QA_SC_Repository.
Unfortunately you will not be able to do this, because this is not how Subversion works :(

For the Subversion client to work it must have a valid working copy.

Now your Y: working copy will be pointing to your Linux Subversion repository and there will be now way you will be able to point it to the C:\QA_SC_Repository repository.

If instead you follow the seven steps that I outlined what should happen is this:

1) AgentSVN will create the local repository
2) AgentSVN will import a new project into the repository
3) AgentSVN will create a valid working copy for that project

For this testing stage you will need to create a new dummy test project, or you will need to remove the svn details found in that folder.

Now you don't want to be removing svn details from you y: folder because you will be corrupting that working copy.

It is much easier, much safer to just create a new test project.

As I said before, once you are sure AgentSVN and TestComplete actually working, only then it is time to try to connect to a real Linux svn repository.
At this point I do not know what to enter in the fields.
What is happening is you are confusing AgentSVN and svn.exe.

On the one hand you are pointing AgentSVN to the empty SVN repository is found here: C:\QA_SC_Repository

On the other hand you are then opening a TestCase project that contains a valid SVN working copy and that working copy is pointing to the Linux SVN repository.

So to have any chance of getting this to work you have to either:

1) Forget doing any local repository testing and connect directly to the Linux Server

2) Forget the Linux Server for now and do the much simpler local machine repository test

As I said befor IMHO the second option is the simplest and easiest option.

Cheers Jussi
hmosley
Posts: 9
Joined: Tue Apr 10, 2012 1:45 pm

Post by hmosley »

I have been around since getting out of college in 1968.

OK, I have on MY windows 7 system both the 1.7.4 CollabNet SVN command line client svn.exe and the TortoiseSVN client provided by my company. The TortoiseSVN about indicates it is 1.7.6 and the Subversion is 1.7.4 (which is different from the 1.6.6 our server admin reported). I do do svn.exe and svnadmin.exe (and others) in two different client trees.

I Deleted and recreated the repository using the "svnadmin create" command line presented. I then opened TestComlete project suite "C:/HRM_TestSVN_Working/SS_HRM_Master_PreSmokeTest". Attempting to add this to source control (File->Source Control->Add Project Suite) allowed me to choose AgentSVN and then I again got to the Project Binding Details screen. Again, the list is empty (prject count is 0); if I try to enter a "name/truck/" as indicated on the popup that tells the project list is zero, then it tells me that the project is not found in the repository.

I am sure this is a YAMS (Yet Another Mosley Screwup), but I am unsure of how to proceed.

BTW, thanks for your assitance; it is certainly more than AutomatedQA (SmartBear) provided.
hmosley
Posts: 9
Joined: Tue Apr 10, 2012 1:45 pm

Post by hmosley »

I do have Microsoft SQL Server Management Studio on my system to connect to DB servers. My Subversion admin confirmed that the version is 1.6.6, which is older than the clients (CollabNet and TortoiseSVN) I have.

I could download a copy of CollabNet Subversion Edge for my 32-bit winodws 7 system and have everything local for this test, but I do not know how to configure Apache or Subversion.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

I have been around since getting out of college in 1968.
So you have a few decades on me ;)
OK, I have on MY windows 7 system both the 1.7.4 CollabNet SVN command line client svn.exe and the TortoiseSVN client provided by my company.
Ok that looks perfect.
The TortoiseSVN about indicates it is 1.7.6 and the Subversion is 1.7.4 (which is different from the 1.6.6 our server admin reported).
I'm not sure what issues this is going to cause if any, but for this initial test it does not matter.
I Deleted and recreated the repository using the "svnadmin create" command line presented.
Excellent.

What happened was AgnetSVN detected the loction provided did not contain a valid SVN repository so it asked for permission to create one.

Naturally, later on when you re-point the location to the real Linux server SVN location AgnetSVN will detect that location as a valid SVN repository.
I then opened TestComlete project suite "C:/HRM_TestSVN_Working/SS_HRM_Master_PreSmokeTest".
Perfect.
Attempting to add this to source control (File->Source Control->Add Project Suite) allowed me to choose AgentSVN and then I again got to the Project Binding Details screen.
This is good.

It looks like we have run into our first TestComplete/AgentSVN incompatiblity :(

Because this is a new repository and you are doing an Add to Source control you should have been presented with the AgentSVN Import Wizard.

Now to detemine why this is not working please do the following:

1) Make sure TestComplete is not running
2) In the AgentSVN Configuration turn on the help debug option
3) Start TestComplete, open your test project
4) Try to add the project to source control
5) Close TestComplete
6) Go back to the AgentSVN Configuration and click on the ... button to open the log file
7) Add the log file to e-mail as an attachment and send it to me (e-mail button below)
Again, the list is empty (prject count is 0)
That is to be expected since the repository is new.
BTW, thanks for your assitance; it is certainly more than AutomatedQA (SmartBear) provided.
I'm more than happy to support AgentSVN and I am very happy with your persistence ;)
I do have Microsoft SQL Server Management Studio on my system to connect to DB servers.
If your interested you could run through this tutorial: http://www.zeusedit.com/agent/ssms/ms_ssms.html

In fact you are half way through this tutorial already (i.e. just use the same local repository).

This will connect Microsoft SQL Server Management Studio to AgentSVN.

I'm almost certain this is going to work since your local machine setup seems to be correct.

It might be a good idea to in fact do the tutorial since it will give you a feel for how AgentSVN works.

For example you will get to see how the AgentSVN Import Wizard works.

But once again, all I can say is try to follow and understand each of the steps in the tutorial.

You will find the steps in this SSMS tutorial will mirror the steps you will be taking in TestComplete, that is once I get AgentSVN working with TestComplete.

NOTE: I think SSMS itself contains an MSSCCI bug and there is a work around to this bug at the end of the tutorial.

Cheers Jussi
hmosley
Posts: 9
Joined: Tue Apr 10, 2012 1:45 pm

Post by hmosley »

Zip file with the log and my inputs & results was just sent. TestComplete is on a separate network than my email system, so there was a slight delay. Again, thanks.
hmosley
Posts: 9
Joined: Tue Apr 10, 2012 1:45 pm

Post by hmosley »

More questions:
1) Assuming we are successful, what is the eventual purchase price for a license?
2) Can I enter a regular expression in the SVN Ignore field, like
"\d{1,2}_\d{1,2}_\d{4}_\d{1,2}_\d{1,2} [AP]M_\d{1,2}_\d{1,3}$"? That is the date-time format TestComplete uses for log files.

Thanks.
Post Reply