I have a rather simple question regarding output step messages in Codeception for which I found no answer in the documentation.
To be more precise: Is there anyway to "alter" the steps output in codeception using an alias?
This:
public function tryToTest(ApiTester $I)
{
$I->sendPOST('/', ['foo' => 'bar']);
$I->seeResponseCodeIs(200);
}
Will output:
I send post "/",{"foo":"bar"}
I see response code is 200
But I would like to alter the "content" with an alias so it can output:
I send post "/", NewCustomerRequest
I see response code is 200
Does Codeception have this capabilities?
No, Codeception has no such capability.
However the right place for such description is in the name of the test.
public function NewCustomerRequest(ApiTester $I)
Also you can use comment actions to add description to the output - amGoingTo
, expect
, expectTo
and comment
https://codeception.com/docs/03-AcceptanceTests#Comments