Skip to main content

#Test Case Management0 diskutieren mit

Hi everyone,

 

I've having trouble in testing my Record-Triggered flow using the Tests feature, that I cannot overcome.

 

In summary, when I run with the Debug, everything is fine, and flow runs until the end.

However, when I run with a Test (either a Test converted from the Debug run, or a new Test created from scratch), it won't run the same way, i.e., it will fail, as it cannot find records related to the $Record that triggered the flow.

 

I've noticed that the Record ID is not the same between the Debug and the Test. In fact, the Record ID,

 from test does not exists. I don't understand why running a Test is making up an inexistent record ID.

 

Please find below is the interview starting info with the correct (existing) Record Id for the Debug run.Flow different behavior between debug and test

 

Below is the interview starting info with the incorrect (non existing) Record Id for the Test run.

(actually, each time I run the Test, it makes up a new Record ID)Record ID from Test.png

 

Has anyone already add this problem ? Is this a bug or is there something I'm missing? Is there a workaround?

 

Thanks in advance

 

#Flow  #Record-Triggered  #Record Id Value  #UI Validation Tests  #Test Case Management

1 Antwort
  1. Davis Johnson (SolomonEdwards) Forum Ambassador
    26. Feb. 2024, 16:25

    @Tiago Simao,

    Flow tests take a copy of the triggering record as the record they operate on. And (similar to Apex tests), the record is never actually committed to the database, it exists solely as on-demand test data. Here is an article that sums up that functionality: https://help.salesforce.com/s/articleView?id=sf.flow_concepts_testing.htm&type=5

    What exactly is the problem you are running into, though?

0/9000

Hi,

 

We have requirement of using Agile Accelerator for Test Case Management. We thought of using Test Case, Test Plan and Test Execution objects for  Test Case Management. But we are facing a lot of issues and errors while doing our analysis. We don't find any documentation for these objects on App Exchange or Online.

 

Do these objects are working as expected?

 

Thanks.

3 Kommentare
0/9000