What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Where does codeception gets the idea the site is on ``? I'm trying to run ``` AP

UK5DS29L2
UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

Where does codeception gets the idea the site is on <https://localhost/>?
I'm trying to run


but I see it fails and the response I get is


instead of the actual source for www.en.spryker-test.local that i have in config

Comments

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    do you have Environment class in some Testify module in your project?

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    I’m asking like that because I have quite an outdated version of Spryker and our internals might be different πŸ™‚

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    there is a method called _initialize()

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited September 2019

    it is (Environment) a codeception module, that is included (or not) into your codecept.yml and is executed (method _initialize is called) when you run your tests.

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    So I would suggest to check such classes that have _initialize() methods. If this is first time you’re trying to run an acceptance test, then you might even need to extend it for Pyz

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    f.e. I have something like this in
    PyzTest\Shared\Testify\Helper\Environment::_initialize():


  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    yeah, I do have this class, but it doesn't have anything else than yours. no localhost mentioned at all

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    correct, but then the β€œlocalhost” might come from config/env variables?

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    check which config file is used, when your tests are running

  • UK5DS29L2
    UK5DS29L2 Posts: 546 πŸ§‘πŸ»β€πŸš€ - Cadet

    yeah the problem is this seems to be the only test that get it wrong, other tests click through the UI on correct hosts just fine

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited September 2019

    ..and you have for sure compared the yml config file to check the potential difference. Then I don’t know πŸ™‚

  • Andriy Netseplyayev
    Andriy Netseplyayev Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    would be interesting to know the casue