How can we scale writing page objects names in Katalon

I want to start thinking about scaling for upcoming large projects. I dont want to manually rename every object. I notice some objects are not always worded right when i use object spy or the web recorded. One example is using the verbiage button when its actually a link. Anyone knows what can help with these type of issues. I am new to this and just asking. Is there a way to BULK auto name objects :slight_smile: . what do you do to ensure your projects can scale as well as making sure you dont have to rename every object. We also need to keep in mind that there will be a whole team working on these projects and some on mutual products hence how do we reduce duplicate objects?

**

**

2 Likes

Hi,

I will investigate it and come back soon

2 Likes

I have the perfect answer, but, unfortunately for you, you’re not going to like it. Sorry.

Don’t use the Recorder. Don’t use Spy. Don’t use the Object Repository.

I said you wouldn’t like it. :frowning_face:

Facts:

  1. Spy is a toy.

  2. The recorder is a toy. It is deliberately limited by design. As you learn more, you will soon come to realize it cannot be used except in the most trivial of cases. And even then you will need to clean up your Object Repository after using it.

  3. The Object Repository is a huge time sink. You will spend hours managing it. The more you add to it, the more time it will take. But you already know this, right? It simply doesn’t scale.

No. You only need to do this because of #2 and #3 above :scream:

1 Like

+1 from me

I do not necessarily agree.

@naomy.arnold

You should make as small number of Test Objects as possible. You should avoid any duplication of Test Objects. You should make the Object Repository as clean as possible.

How you can keep the Object Repository clean? — You can create Test Objects into the Object Repository one by one manually while you think carefully in which subfolder you want to save each Test Objects, how you want to name them. This way you would be 100% sure all the Test Objects will have good names for you.

1 Like

There is no shortcut method to rename in bulk, as per my knowledge and understanding.
I have managed my Object Repository as Module wise and decided appropriate and meaningful name during automation. This is now only way.

1 Like

I will really appreciate this! We also need to keep in mind that there will be a whole team working on these projects and some on mutual products hence how do we reduce duplicate objects?

1 Like

See my previous post just for your interest:

Unfortunately there is no magic that saves you instantly.

2 Likes

@naomy.arnold

Do you use the version control system “git” for your project?
If yes, that’s good.
If not, you should start using “git” before any project refactoring. I would warn you, you would encounter many surprises in KS when you do refactoring tasks: renaming folders and files. KS has a lot of bugs.

2 Likes

Thank You… I am new to it so don’t have much work but this will come in handy in the future…

1 Like

I think I may create them by each product page for the company, this should work! If there is any changes we go directly to that page and make changes if needed. Thank you so much for your response

1 Like

thank you Kaz

1 Like

Thank you so much for your response

2 Likes

thank you @Russ_Thomas

1 Like

Hi @naomy.arnold, We use a combination of object repository objects and objects created in memory at runtime. Which works well for our team. See this example: Sample test case for creating Katalon compatible Test Objects in memory Tip

2 Likes

First off, I appreciate you taking the time our of your day to help me @Dave_Evers . I am a bit new to this… So creating it memory at runtime means we don’t have to create objects by spy or recorder? Just do it at runtime and never have to worry about duplication etc…

2 Likes

Hi @naomy.arnold, please see Mike’s post: Sample test case for creating Katalon compatible Test Objects in memory Tip - #4 by grylion54

As well, because you are new to automation, I would follow Kaz’s suggestion: “You can create Test Objects into the Object Repository one by one manually while you think carefully in which subfolder you want to save each Test Objects, how you want to name them. This way you would be 100% sure all the Test Objects will have good names for you.” These objects can then be shared/used by other test cases. I used Katalon Studio ‘Web Record’ to record the following objects, I then manually updated the object names and folder names as needed. As Kaz mentioned, before you start refactoring object and folder names make sure you are using “version control” to ensure you do not lose any of your work.
See this link regarding using Katalon’s Git version control feature: Could not update test object references after renaming test objects - #3 by Dave_Evers

Test Website example: (http://demoaut.katalon.com)

2 Likes

if many resources are working then obviously this type of issues come but best practice is to instruct everyone how to manage name of objects so that duplicacy of object could not be repeated.

1 Like