The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP ALM / Mercury Quality Center

Pages: 1 | 2 | >> (show all)
castrojas
Member


Reged: 08/24/07
Posts: 28
this test is locked by another quality center user
      #419184 - 09/26/07 12:50 AM

Hi all,

one of my QTP user hits the message "this test is locked by another quality center user" "it will open is Read-only mode"
Actually no other user is opened the test in Edit mode,
I confirmed this via site admin user connection sessions
Any idea why its happens, are there any setting in QTP/QC to avoid this problem

Thanks all


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tony Davis
Veteran


Reged: 03/23/00
Posts: 3082
Loc: Orange County, CA
Re: this test is locked by another quality center user [Re: castrojas]
      #419323 - 09/26/07 07:45 AM

you might need to look in the LOCK table for the project to see if there is an orphan entry that needs to be removed for the test.

Get the test ID that is reporting as locked, then just query the table to see if that test is there (I lay odds it is), then all you need to do is delete that entry in the table.

--------------------
Insanity: doing the same thing over and over again and expecting different results


Post Extras: Print Post   Remind Me!   Notify Moderator  
Wraith
Member


Reged: 08/22/07
Posts: 112
Loc: Raleigh, NC USA
Re: this test is locked by another quality center [Re: Tony Davis]
      #419326 - 09/26/07 07:51 AM

select * from locks (shows all rows in the lock table)

delete from locks where lk_session_id=<whatever one is causing your problem> (deletes the "stuck" lock allowing users to edit the test again)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Jonty
Super Member


Reged: 01/17/07
Posts: 1267
Loc: India
Re: this test is locked by another quality center user [Re: castrojas]
      #421092 - 10/03/07 03:28 AM

sometimes you may have imposed a self lock on it..?

This happens mostly when user kill the QTP process when the script is still open(from QC).

--------------------
Cheers
Jonty..
-- Here to Learn and share ---


Post Extras: Print Post   Remind Me!   Notify Moderator  
Juleo_2607
Advanced Member


Reged: 05/11/05
Posts: 442
Loc: Pune
Re: this test is locked by another quality center user [Re: Jonty]
      #421105 - 10/03/07 03:56 AM

Yes, this seems a known issue with TD/QC.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Nvn
Newbie


Reged: 11/19/06
Posts: 10
Re: this test is locked by another quality center user [Re: Juleo_2607]
      #435777 - 11/25/07 11:06 PM

Hi,
How to reopen it? Since we are working in a comapny they will be having a server and that server we cannot access. so how come we can run the previous SQL query and delete the particular row. Any other solution for that?

Thanks n Rgds
Naveen


Post Extras: Print Post   Remind Me!   Notify Moderator  
Patterson_Consulting
Active Member


Reged: 10/12/01
Posts: 719
Loc: Nashville, TN, USA
Re: this test is locked by another quality center user [Re: Nvn]
      #435904 - 11/26/07 06:41 AM

QC stores locks in the database table, so that's the only way to remove the lock. Whoever has access to Quality Center Site Administration can do this for you. Otherwise, contact your DBA.

--------------------
Boyd Patterson
Patterson Consulting, LLC
www.patterson-consulting.net

Creator of Test Design Studio - Powerful IDE for QuickTest Pro


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tony Davis
Veteran


Reged: 03/23/00
Posts: 3082
Loc: Orange County, CA
Re: this test is locked by another quality center user [Re: Patterson_Consulting]
      #435924 - 11/26/07 06:59 AM

Probably opening a can of worms, but you can do it through workflow scripting as well (using the TDConnection database access functionality).

We created a new button and some code behind it for managers at my last place of employment to perform the needed query to delete the locked user, Although we would have to do a blanket deletion for that user, having them log out and removing all reamining locks listed in the table for the specific user (supplied via an Input box).

Still, to do this, you would need to talk to your DBA as the log in and password to the database is required to connect.

--------------------
Insanity: doing the same thing over and over again and expecting different results


Post Extras: Print Post   Remind Me!   Notify Moderator  
Patterson_Consulting
Active Member


Reged: 10/12/01
Posts: 719
Loc: Nashville, TN, USA
Re: this test is locked by another quality center user [Re: Tony Davis]
      #435939 - 11/26/07 07:23 AM

By default, non-Admin users cannot use the 'Command' API object to execute queries on the project database unless you update the Site Admin parameters to explicitly enable this feature. I think this changed in QC 8.2, but can't remember exactly when it happened.

--------------------
Boyd Patterson
Patterson Consulting, LLC
www.patterson-consulting.net

Creator of Test Design Studio - Powerful IDE for QuickTest Pro


Post Extras: Print Post   Remind Me!   Notify Moderator  
Tony Davis
Veteran


Reged: 03/23/00
Posts: 3082
Loc: Orange County, CA
Re: this test is locked by another quality center user [Re: Patterson_Consulting]
      #435949 - 11/26/07 07:38 AM

hmmn - I think I might have to contact wmcvetty back there and ask exactly what we did. But thinking on it, the people who had access to it were all project admins, the only person that should have been able to handle, and know when to handle, the script being run.

I think I need to retract my statements on this as it is a little more complex than I remember it was to implement.

Thanks Boyd.

--------------------
Insanity: doing the same thing over and over again and expecting different results


Post Extras: Print Post   Remind Me!   Notify Moderator  
wmcvetty
Member


Reged: 10/10/06
Posts: 133
Loc: Nashville, TN
Re: this test is locked by another quality center [Re: Tony Davis]
      #436508 - 11/27/07 11:42 AM

Seems we tied a new action to a toolbar button that was limited to admin users only. Then we just used the Command API within the associated sub to create and run the query to remove the locks. That way there is no need to have to DBA's involved.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Tony Davis
Veteran


Reged: 03/23/00
Posts: 3082
Loc: Orange County, CA
Re: this test is locked by another quality center [Re: wmcvetty]
      #436517 - 11/27/07 12:10 PM

WOW - were your ears burning? I hadn't even worked around to asking you yet! LOL

To make it easy for the original poster (yeah, I am feeling uncharacteristically generous today ), would you be able to post the function created for it against the toolbar button? Not the code to call the action, just the action itself?

Thanks Walter.

--------------------
Insanity: doing the same thing over and over again and expecting different results


Post Extras: Print Post   Remind Me!   Notify Moderator  
Patterson_Consulting
Active Member


Reged: 10/12/01
Posts: 719
Loc: Nashville, TN, USA
Re: this test is locked by another quality center [Re: Tony Davis]
      #436518 - 11/27/07 12:15 PM

The trick being, of course, that you can access and use the Command API object

--------------------
Boyd Patterson
Patterson Consulting, LLC
www.patterson-consulting.net

Creator of Test Design Studio - Powerful IDE for QuickTest Pro


Post Extras: Print Post   Remind Me!   Notify Moderator  
wmcvetty
Member


Reged: 10/10/06
Posts: 133
Loc: Nashville, TN
Re: this test is locked by another quality center [Re: Patterson_Consulting]
      #436522 - 11/27/07 12:26 PM

Yeah, I found you talking about me in my daily searches...haha!

Code:
 
Sub TestPlan_DeleteLocks()
On Error Resume Next
desc = "Please provide the network id for the user, and please make sure" &_
"this user is logged out prior to removing locks"
UName = InputBox(desc,"Provide network id")
If(UName <> "") Then
Set cmd = TDConnection.Command
cmd.CommandText = "DELETE FROM Locks WHERE LK_USER = '" & UName & "'"
cmd.Execute
MsgBox "All locks for user id: " & UName & " were removed", _
vbNotify+vbOKOnly,"Compelted"
Else
MsgBox "No locks were changed", vbNotify+vbOKOnly, "No Info"
End If
On Error Goto 0
End Sub



Post Extras: Print Post   Remind Me!   Notify Moderator  
Tony Davis
Veteran


Reged: 03/23/00
Posts: 3082
Loc: Orange County, CA
Re: this test is locked by another quality center [Re: Patterson_Consulting]
      #436528 - 11/27/07 12:33 PM

killjoy

but in all seriousness, I have a question for you on that access level to make use of the command object.

Is it tied to the TDAdmin, or a project admin level? I am pretty sure that (at the time) Walter and I were the only TDAdmins, with the Group Manager and her backup set up as Project Admins at best (and I am not very confident in saying they were tied to that group access).

I think I might be on the verge of walking slowly out of the thread not to draw attention to myself as I go grab some salt to eat my words. As I should know better then to question you Boyd

--------------------
Insanity: doing the same thing over and over again and expecting different results


Post Extras: Print Post   Remind Me!   Notify Moderator  
wmcvetty
Member


Reged: 10/10/06
Posts: 133
Loc: Nashville, TN
Re: this test is locked by another quality center [Re: Tony Davis]
      #436532 - 11/27/07 12:41 PM

Just to be sure, I checked and the true users of this code are not in the TDAdmin group, just in the group that we had specified as project admins.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Tony Davis
Veteran


Reged: 03/23/00
Posts: 3082
Loc: Orange County, CA
Re: this test is locked by another quality center [Re: wmcvetty]
      #436535 - 11/27/07 12:53 PM

Thanks Walter -

I'll wait for Boyd to tell me if I need to go get Salt or not at this point

--------------------
Insanity: doing the same thing over and over again and expecting different results


Post Extras: Print Post   Remind Me!   Notify Moderator  
Patterson_Consulting
Active Member


Reged: 10/12/01
Posts: 719
Loc: Nashville, TN, USA
Re: this test is locked by another quality center [Re: Tony Davis]
      #436538 - 11/27/07 01:11 PM

Walter, have you checked to see if your Site Admin parameters have enabled the use of the Command object?

DISABLE_COMMAND_INTERFACE = N

I'm getting curious if the QC implementation doesn't match what they documented (wouldn't be the first time).

--------------------
Boyd Patterson
Patterson Consulting, LLC
www.patterson-consulting.net

Creator of Test Design Studio - Powerful IDE for QuickTest Pro


Post Extras: Print Post   Remind Me!   Notify Moderator  
wmcvetty
Member


Reged: 10/10/06
Posts: 133
Loc: Nashville, TN
Re: this test is locked by another quality center [Re: Patterson_Consulting]
      #436543 - 11/27/07 01:19 PM

Quote:


DISABLE_COMMAND_INTERFACE = N





That is what our Site Configuration is set to. So does that open the command object to everyone with that setting?


Post Extras: Print Post   Remind Me!   Notify Moderator  
Patterson_Consulting
Active Member


Reged: 10/12/01
Posts: 719
Loc: Nashville, TN, USA
Re: this test is locked by another quality center [Re: wmcvetty]
      #436545 - 11/27/07 01:25 PM

I feel redeemed! This setting means you're essentially turning off the security feature that was added in QC 8.2.

One of the reasons this feature was added is because the Command object doesn't restrict the type of command you can execute. As you illustrated, you're dropping records from the LOCKS table. It's just as easy to delete bugs, tests, history records, etcs. It also allows you to bypass security settings and data-hiding filters. Even someone from the Viewer user group could run any query they want.

--------------------
Boyd Patterson
Patterson Consulting, LLC
www.patterson-consulting.net

Creator of Test Design Studio - Powerful IDE for QuickTest Pro


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1 | 2 | >> (show all)



Extra information
0 registered and 26 anonymous users are browsing this forum.

Moderator:  Rich W., AJ, jgottlieb 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 16540

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5