문제

We have a MFTF test related to coupon codes that fail in 4 of 10 cases.

How can we debug this properly.

We already isolated the single test case and can reproduce it locally, it still takes 50 minutes to run 10 times.

Now we are looking for good strategies to debug that.

올바른 솔루션이 없습니다

다른 팁

First idea:

Put a

<wait stepKey="almostForever" time="65535">

at the part where the test fails and try to reproduce the problem manually from there on

Interactive pause:

https://devdocs.magento.com/mftf/docs/interactive-pause.html#use-pause-on-test-failure

But this works only for MFTF v3 - we are currently on MFTF v2

Next idea: Manipulate the PHP code MFTF generates.

  1. vendor/bin/mftf generate:tests
    
  2. edit the PHP file in _generated folder like this:

    try {
    
        $I->see( ... );
    catch (\Exception $e) {
        sleep(10000000);
    }
    
  3. vendor/bin/mftf run:group --skip-generated   # call 10 times
    

Further approaches:

  • Comment out After-Suite to avoid cleaning up the database
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top