Testing and test cases

I am testing a xaml of login so it has send emails when errors then what to do should i keep them or how, During debug does it send mails or not and store log files or create folders and should i comment them or not needed and during debug run current test case means running entrie project.

Hi @Abh

During Debug, UiPath executes everything as written emails are sent, logs are written, and folders are created.
Best practice is to use a debug flag to skip emails or external actions while testing.

Can you tell how to create a debug flag

Create a Boolean variable or argument, for example in_IsDebug.

How:

  1. Create a Boolean argument/variable
  • Name: in_IsDebug
  • Type: Boolean
  • Default value: True (for debug)
  1. Wrap email / external actions in an If:

    If Not in_IsDebug
    → Send Mail
    End If

  2. When running in production, set in_IsDebug = False.

This way, during Debug no emails/files/actions are triggered, but production runs normally.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.