After you develop code, you must debug the code. This topic describes how to perform smoke testing in the development environment.
Background information
To ensure that the task you created can be run as expected, we recommend that you perform smoke testing before you deploy the task. If you configure scheduling parameters for a task, you can perform smoke testing on the task to check whether the scheduling parameters work as expected.
Go to the DataStudio page
Go to the DataStudio page.
Log on to the DataWorks console. In the top navigation bar, select the desired region. Then, choose in the left-side navigation pane. On the page that appears, select the desired workspace from the drop-down list and click Go to DataStudio.
Enable the Force smoke testing feature
The administrator of a workspace can enable the Force smoke testing feature on the Settings page of DataStudio. If this feature is enabled, smoke testing must be successful before a task in the workspace is deployed to the production environment. If smoke testing fails, the task cannot be deployed to the production environment. To enable the Force smoke testing feature, perform the following steps:
The Force smoke testing feature is not available for workspaces in basic mode.
In the lower-right corner of the left-side navigation pane of DataStudio, click the icon.
On the Settings page, click the Security Settings and Others tab. In the Smoke Testing section, turn on Force smoking test.
Perform smoke testing
After you develop code, you can use one of the following methods to perform smoke testing before you deploy and run a task:
Method 1: When you commit a node, click the icon in the toolbar of the configuration tab of the node. In the Commit Node dialog box, select Yes for Smoke Testing.
Method 2: After you commit a node, click the icon in the toolbar of the configuration tab of the node. In the Smoke Testing dialog box, configure the Data Timestamp parameter and click OK.
Method 3: After you commit a node, click Deploy in the toolbar of the configuration tab of the node. On the Create Deploy Task page, click Smoke Testing in the Actions column.
Method 4: In the upper part of the DataStudio page, click Operation Center. In the upper-left corner of the Operation Center page, switch to the development environment. In the left-side navigation pane, choose
. In the right-side canvas, right-click the desired node and select Test. In the Test dialog box, click OK.
Configure smoke testing parameters
Before you perform smoke testing, you must configure the Data Timestamp parameter based on your business requirements.
If you set the Data Timestamp parameter to the current day or the previous day, the related smoke testing instance is not run until the scheduling time arrives. For example, the current time is 12:00 on June 2, 2024
, and the scheduling time of a smoke testing instance is 15:00
. If you set the Data Timestamp parameter to June 1, 2024
, the actual time of the smoke testing instance is 15:00, June 2, 2024
. In this case, the smoke testing instance is not run until 15:00
on the current day.
View smoke testing records
On the configuration tab of the desired node, click the icon in the toolbar to go to the Smoking Testing Records page.
NoteIf you use Method 1 to perform smoke testing, you can perform this step to view smoke testing records.
If you use Method 2 to perform smoke testing, you can view the smoke testing records in the View Smoke Testing Records dialog box. The dialog box appears after you perform smoke testing.
You can also click Smoke Testing Records in the left-side navigation pane to view the smoke testing records. If the Smoke Testing Records module is not displayed in the left-side navigation pane, you can add the module. For more information, see Adjust the displayed DataStudio modules.
On the Smoke Testing Records page, you can view information such as Tested At, Version, Tested By, and Data Timestamp. You can select Initiated in DataStudio to view the smoke testing records that are triggered on the DataStudio page.
NoteIf you select Initiated in DataStudio, the displayed smoke testing records do not include the smoke testing instances that are run in the development environment on the Operation Center page.
On the Smoke Testing Records page, you can click View Logs in the Actions column to view the execution details of a specific smoke testing instance. You can click Stop in the Actions column to stop a smoke testing instance for which the value of Status is Running.