# How to rename the default profile?

**URL:** <https://forum.katalon.com/t/how-to-rename-the-default-profile/58780>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [September 30, 2021, 2:01pm UTC](https://forum.katalon.com/t/how-to-rename-the-default-profile/58780 "2021-09-30T14:01:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![novino\_dragon](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/novino_dragon/32/16104_2.png) [@novino\_dragon](https://forum.katalon.com/u/novino_dragon)\
**Post date:** [September 30, 2021, 2:01pm UTC](https://forum.katalon.com/t/how-to-rename-the-default-profile/58780/1 "2021-09-30T14:01:42Z")

</div>

Is there a way to easily rename the ‘default’ profile? We wanted to use a different name but the ‘rename’ option is disabled in the UI. So we went ahead and deleted the default.glbl file from the project, but that started throwing this error: _Could not evaluate variable of profile: default_  
and this is because of this line in %\Libs\internal\GlobalVariable.groovy  
`def selectedVariables = TestCaseMain.getGlobalVariables("default")`

If I comment this line then the tests execute without any problem, but the change is lost on restarting Katalon Studio or re-opening the project.  
Another workaround I found was to execute this in TestListener inside `@BeforeTestSuite`  
`import com.kms.katalon.core.configuration.RunConfiguration as RC`  
`def executionProfile = RC. getExecutionProfile()`

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [September 30, 2021, 2:19pm UTC](https://forum.katalon.com/t/how-to-rename-the-default-profile/58780/2 "2021-09-30T14:19:54Z")

</div>

> [@novino\_dragon](#):
>
> We wanted to use a different name but the ‘rename’ option is disabled in the UI.

That’s because (as you discovered) the default profile is _required_. That’s how KS works right now. Maybe that might change in the future, but right now, it needs to be there.

> [@novino\_dragon](#):
>
> but the change is lost on restarting Katalon Studio or re-opening the project.

Exactly. Because it needs to be there.

If it’s an issue that you don’t accidentally use it, write some script that lives in a test case listener, that detects the profile name and if it’s “default”, aborts the test.

```javascript
  @BeforeTestCase
  def beforeTestCase(TestCaseContext testCaseContext) {
    checkProfile()
    comment("beforeTestCase completed.")
    comment("Control transferring to Test Case...")
  }
  
  void checkProfile() {
    String profileName = RunConfiguration.getExecutionProfile()
    if(profileName == "default") {
      FORCESTOP("The default profile is not supported!")
    }
  }

```

`FORCESTOP` is merely a `throw` – you can change it to any throw message you prefer.

---

<div class="post-metadata">

**Author:** ![novino\_dragon](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/novino_dragon/32/16104_2.png) [@novino\_dragon](https://forum.katalon.com/u/novino_dragon)\
**Post date:** [October 1, 2021, 4:49am UTC](https://forum.katalon.com/t/how-to-rename-the-default-profile/58780/3 "2021-10-01T04:49:08Z")

</div>

Thank you very much, this makes things clear and I can work around it for now.

---

<div class="post-metadata">

**Author:** ![mwarren04011990](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/mwarren04011990/32/26024_2.png) [@mwarren04011990](https://forum.katalon.com/u/mwarren04011990)\
**Post date:** [November 25, 2023, 11:46pm UTC](https://forum.katalon.com/t/how-to-rename-the-default-profile/58780/4 "2023-11-25T23:46:32Z")

</div>

Probably the Katalon devs hard coding stuff such as a profile file name
