---
title: "Dynamic Data - Generate a Future Date on Automation Execution"
slug: "dynamic-data-generate-a-future-date-on-automation-execution"
description: "In this feature video, learn how to use the automation framework to assign a date in the future using Test Modeller."
tags: ["Test Modeller", "Feature Overviews"]
updated: 2024-09-27T14:46:44Z
published: 2024-09-27T14:46:44Z
canonical: "knowledge.curiositysoftware.ie/dynamic-data-generate-a-future-date-on-automation-execution"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.curiositysoftware.ie/llms.txt
> Use this file to discover all available pages before exploring further.

# Dynamic Data - Generate a Future Date on Automation Execution

In this feature video, learn how to use the automation framework to assign a date in the future: dynamic dates which update every time automation is executed but also plugged into other objects.

[Embedded content](https://www.youtube.com/embed/1dIUCNL8Sy8?&amp;wmode=opaque&amp;rel=0)

In the context of an existing test case Model, this example Java code assigns a dynamic date, which update every time automation is executed.

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678451712044.png)

---

## Creating a function which can be used in a test model

the example the objective is to be able to execute the String…

getTomorrowsDate()

…as a Function in**Quality Modeller**’s automation framework. To do so, have a Java code snippet ready to copy and paste from a text editor.

Then using the existing model located in Explorer (Dashboard far left) click the *module object***</>Login** which now gives the option to create a **+New Function** (light blue button) as part of the **Module Collection**.

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678451833450.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678451840788.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678451848108.png)  

**Select Custom Code (to reveal the Code tab) from the Function Type drop down of the New Function panel**.

In the test case example where the Java code is to **assign a dynamic date which update every time automation is executed** the example uses…

getTomorrowsDate

…as the **Qualified Name.** Then add the **Object Name** (which will be used in the Automation panel later), in this example *Tomorrows Date*. Parameters can be left unassigned. Remember to assign a Return Type *String*in the Return tab text field. Then finally paste the Java code in the Code tab and hit Save. The Function named *Tomorrows Date* is now listed as part of the **</> Module Collection.**

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678451931062.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678451939787.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678451947967.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678451954454.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678451960320.png)  
![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678451970058.png)

---

## Experimenting with one path

**Now navigate the model on the Quality Modeller canvas and also locate the Function** named *Tomorrows Date*listed under Projects > Components > Dynamic Data in the **Project Explorer / Automation panel (far right).**

Apply the automation in a 3-step process: **manually select the arrow highlighted on the canvas**, **click the listed Function***Tomorrows Date*, then **hit the blue Import button**. To view the Output Parameter*Tomorrows Date* **hit Edit in the Automation panel**.

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452026628.png)![](blob:https://portal.document360.io/30ea13ae-b90f-4511-9940-223ab235f145)

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452047026.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452052965.png)  
  

**Finally, the next 3-steps allow the module Function to be attributed to another waypoint.** In this example, Positive Enter Email is selected. **In the Automation panel, set the variable in the dropdown** to *Tomorrows Date.*Then **hit the Generate (plane icon)**in the Automation panel. To zip the source code for downloading, **hit the Run button followed by the cog icon </>Automation code** in the Wizard**.**

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452095666.png)

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452100817.png)

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452106776.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452113026.png)

---

## Getting data back to plug into another object

To download the zip file of the source code, **select the Execution tab in the Automation Generation Settings** panel.

Remember to *hit the close button once it’s downloaded*.

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452158060.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452164470.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452178894.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452187021.png)

---

## View the results

**In a model, it’s possible to check its execution history of +New Function in </>Module Collection.** In the Scenario in the Automation panel highlight a Generated path,**select Results from the drop-down**, and finally in the **Execution History panel click the eye icon to view the Log/Attachment details.**

![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452210994.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452216699.png)![](https://cdn.document360.io/77f722a6-2d0a-49fa-8074-572515a6c4b8/Images/Documentation/image-1678452223783.png)

A Model is a canvas and the Flow that is built onto it. There are several types of Model, some of which display different tabs and tools on the toolbar in Quality Modeller.

## Related

- [Quality Modeller 101](/test-modeller-101.md)
- [Exploring Test Data in Models](/test-data-in-models.md)
