Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: "How Do I Retrieve the OTP When it’s Embedded within HTML Tags?"
metadesc: "Extract OTPs embedded in HTML emails by removing HTML tags using an addon, ensuring only the numeric OTP is captured for test execution."
order: 24.43
page_id: "how-do-i-retrieve-the-otp-when-its-embedded-within-html-tags"
warning: false
contextual_links:
- type: section
name: "Contents"
- type: link
name: "Prerequisites"
url: "#prerequisites"
- type: link
name: "Steps to Install the Addon"
url: "#steps-to-install-the-addon"
- type: link
name: "Steps to Remove the HTML tag symbols from the OTP"
url: "#steps-to-remove-the-html-tag-symbols-from-the-otp"
---

---

When an OTP is embedded within HTML tags in an email, extracting it using a regex pattern also captures the surrounding HTML symbols. To use the OTP in test execution, an addon is used to remove these extra characters and extract only the numeric value.

This article discusses how to remove the HTML tag symbols from the OTP.

---

> ## **Prerequisites**
>
> Before you begin, ensure that you have referred to the [documentation on MailboxFunctions Function Type](https://testsigma.com/docs/test-data/data-generators/mailboxfunctions-function-type/).

---

## **Steps to Install the Addon**

1. From the left navigation bar, go to **Addons** and click **Add-ons**.
![Addons](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_1.png)

2. Under the **New & Updated Addons** section, search for the **Remove Special character from testdata** addon and click **Install**.
![Install Addon](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_2.png)

---

## **Steps to Remove the HTML tag symbols from the OTP**

1. In your test case, first, use the **Store test data1 in test data2** NLP to store the extracted OTP in a runtime variable.
![NLP 1](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_3.png)

- Click the **test data1** placeholder and replace it by selecting **Data Generator** from the **Test Data Types** dropdown. ![Data Generator](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_4.png)
- In the **Data Generator** overlay, configure the **Get Email OTP** function by selecting **Default** as the type, **MailBoxFunctions** as the function type, entering the regex pattern (for example, **>\d{6}<**), choosing the mailbox, setting the timeout, and clicking **Save**. ![Get email OTP](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_5.png)
- Enter a variable name in the **test data2** placeholder. ![test data2](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_6.png)
- Click **Create Step**. ![Create Step](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_7.png)

2. Secondly, use the **Remove Special char testdata1 from testdata2 and store it in runtime variable** NLP to remove the special character from the OTP.
![NLP 2](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_8.png)

- Click the **testdata1** placeholder and enter ><. ![testdata 1](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_9.png)
- Click the **testdata2** placeholder and replace it by selecting **Runtime** from the **Test Data Types** dropdown. ![test data2](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_10.png)
- In the **Runtime Variable** overlay, select the runtime variable you created in the previous step. ![Runtime Variable](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_11.png)
- Enter a variable name in the **variable** placeholder. ![Variable](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_12.png)
- Click **Create Step**. ![Create Step](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_13.png)

---
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: "How to Configure the OracleDB Add-on in Testsigma?"
metadesc: "Learn how to configure the Oracle Database add-on in Testsigma with the required connection details for successful database integration."
order: 24.44
page_id: "how-to-configure-the-oracledb-add-on-in-testsigma"
warning: false
contextual_links:
- type: section
name: "Contents"
- type: link
name: "Steps to Install the Addon"
url: "#steps-to-install-the-addon"
- type: link
name: "Steps to Set Up the Database Connection"
url: "#steps-to-set-up-the-database-connection"
---

---

In Testsigma, the configuration of the Oracle Database add-on requires specific database connection details to ensure successful communication between the application and the Oracle database. This article discusses how to install the add-on and set up the database connection.

---

## **Steps to Install the Addon**

1. From the left navigation bar, go to **Addons** and click **Add-ons**.
![Addons](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/otp_1.png)

2. Under the **New & Updated Addons** section, search for the **OracleDB_Queries** addon and click **Install**.
![Install Addon](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/Oracle_2.png)

---

## **Steps to Set Up the Database Connection**

1. In your test case, use the **Execute OracleDB Query on the Connection DB_Connection_URL and verify affected rows count is Row-Count** NLP to execute the query and fetch the required database details.

2. Click the **Query** placeholder and enter the SQL query to be executed on the Oracle database.

**Example query:**

SELECT * FROM employees WHERE employee_id = 103;

This query fetches all details of the employee whose ID is 103 from the employees table. Use this example as a reference and replace it with the required query based on your test scenario.

3. Click the **DB_Connection_URL** placeholder and use the following syntax to enter the URL:

**jdbc:oracle:thin:@//&lt;host&gt;:&lt;port&gt;/&lt;service_name&gt;?user=&lt;username&gt;&password=&lt;password&gt;&internal_logon=&lt;role&gt;**

Now, replace the placeholders with your Oracle database details:
- **Host Name** – The hostname of your database server (e.g., localhost).
- **Port** – The port on which the database is running (e.g., 1521).
- **Service Name** – The service name of the database (or select SID if service name is unavailable).
- **Username** – Your database username (e.g., SYS).
- **Password** – Your database password.
- **Role** – Database role (e.g., SYSDBA).

![OracleDB](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/faq/Oracle_1.png)

Example URL using the screenshot details:

**jdbc:oracle:thin:@localhost:1521:ORCL?user=SYS&password=<123456789012>&internal_logon=SYSDBA**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Remove angle brackets from password in example JDBC URL.

The example JDBC URL shows the password as <123456789012>, but angle brackets should only wrap placeholders, not actual values. Passwords should be provided without angle brackets.

🔧 Proposed fix
-   **jdbc:oracle:thin:@localhost:1521:ORCL?user=SYS&password=<123456789012>&internal_logon=SYSDBA**
+   **jdbc:oracle:thin:@localhost:1521:ORCL?user=SYS&password=123456789012&internal_logon=SYSDBA**
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**jdbc:oracle:thin:@localhost:1521:ORCL?user=SYS&password=<123456789012>&internal_logon=SYSDBA**
**jdbc:oracle:thin:@localhost:1521:ORCL?user=SYS&password=123456789012&internal_logon=SYSDBA**
🤖 Prompt for AI Agents
In
@src/pages/docs/FAQs/general/how-to-configure-the-oracledb-add-on-in-testsigma.md
at line 62, The example JDBC URL currently includes the password wrapped in
angle brackets; update the JDBC string
**jdbc:oracle:thin:@localhost:1521:ORCL?user=SYS&password=<123456789012>&internal_logon=SYSDBA**
to remove the brackets so the password is shown as **password=123456789012**
(i.e., replace `password=<123456789012>` with `password=123456789012`) so
placeholders remain bracketed elsewhere but actual example values are not.


[[info | **NOTE**:]]
| In the **Service Name** field:
| - If you select **SID**, enter FREE (the default service).
| - If you select **Service Name**, enter your actual service name.

4. Click the **Row-Count** placeholder and specify the expected number of affected rows for validation.

5. Click **Create Step**.

---