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 . 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?
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.
Spy is a toy.
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.
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
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.
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.
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.
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…
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