Codeception子文件夹

As I understand it, out of the box Codeception will put all tests in one of the folders it makes based on type such as unit, functional, or acceptance. With large projects, that can easily get out of hand though. I'm trying to figure out how to have a structure like this:

- functional
    - Module1
        - Applications
            - ApplicationType1Cept.php
            - ApplicationType2Cept.php
        - Accounts
            - AccountType1Cept.php
            - AccountType2Cept.php

When I do this:

codecept.phar generate:cept functional AccountType1Cept

It will put the new file in the root of the functional folder. I've tried doing something like:

codecept.phar generate:cept functional/Module1/Applications AccountType1Cept

But that does not work. I suspect it has something to do with suites, but not sure.

How can I get codeception to generate (and execute) tests in a more organized structure?

I am working on something similar, but on Windows. Right now I have installed Codeception as global using Composer:

composer global require "codeception/codeception=2.0.*"
composer global require "codeception/specify=*"
composer global require "codeception/verify=*"

This allows me to switch to a specific folder like yours "/Module1/Applications/" and then issue the commands directly, e.g.:

a) set up the test directory:

codecept bootstrap

b) create the tests by:

codecept generate:cept functional AccountType1Cept

If you prefer, you can do it from the main directory, but you have first to tell Codeception the name, then use the "-c" option to indicate that you want to execute the command in the directory that follows, and then the target directory. In your case (using Linux) it would be:

codecept.phar generate:cept functional AccountType1Cept -c ~/Module1/Applications 

but for me it's too much typing, it's easier to just switch to the target folder and issue all the commands there :-)

More information: http://codeception.com/docs/07-AdvancedUsage#Running-from-different-folders

I had a similar need. What you need to do is something like this:

codecept.phar generate:cept functional "Application\ApplicationType1Cept"
codecept.phar generate:cept functional "Account\AccountType1Cept"

This creates the test files in the folders you want and namespaces them also.