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"]

```
It depends on how you're using it. You're probably talking about doing acceptance test, although that concept can be used for any action that drives a browser interaction from the first person. So you might do something like :

```
$I->amOnPage('/homepage');
$I->loginAsAdmin();

```

So depending on what you were doing, you could identify Codeception through whatever normal login actions you were doing. For instance, if you were testing WordPress, you could create a username "CodeceptTester" and just watch for that login. It's tough to set actual headers. You can do it with PHPbrowser, but not with Selenium. In fact, I'm pretty sure you cannot set the Selenium headers through Codeception, but there are plugins for the browsers that can do this. You CAN do it with PhantomJS but I don't know how.

[setting request headers in selenium](https://stackoverflow.com/questions/15645093/setting-request-headers-in-selenium/15647143#15647143)

<http://phptest.club/t/useragent-in-codeception/186/3>