Question: We run our Codeception tests (as smoke tests) against our production environment through Browserstack. Is there an easy way to identify Codeception? Through setting custom headers, user-agent or cookies?

The reason being, we constantly run A/B tests on our site and want to always show the control segment to Codeception. 

I am not able to find any documentation about it.

Answer: 
This is what I ended up doing. In acceptance.test.yml, I used the chrome browser (did not matter to me) overwrote the user-agent using args and looked for that in my prod environment. 

```
capabilities:
   chromeOptions:
     args: ["--user-agent=SmokeTesting"]

```
Perhaps you can identify it by looking at user agent string. For example, we're using Chrome headless (+`WebDriver`) and it's nicely introducing itself:

`Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/63.0.3239.84 HeadlessChrome/63.0.3239.84 Safari/537.36`

...but you can't be 100% sure it's you because, in theory, someone else could be running it against your website as well.

Alternatively, you can override `amOnPage()` method in your acceptance tester to set a header before calling `parent::amOnPage()`:

```
public function amOnPage($page)
{
    $this->haveHttpHeader('x-codeception', '1');
    parent::amOnPage($page);
}

```

Just don't forget overriding `amOnUrl()` too, because it will hit the page in the same way as `amOnPage()`, while `amOnSubdomain()` only switches the subdomain without visiting it.