Codeception: Can't generate acceptance test, during quick start on VM

Created on 3 Sep 2013  Â·  9Comments  Â·  Source: Codeception/Codeception

I were just trying out the Codeception testing suite since we thought we need better testing, specially selenium tests. So I downloaded the phar archive and began to run the quick start instructions available on http://codeception.com/quickstart.

The problem occurs when I have created a new suite and were going to generate an acceptance test. It just gives me an error:

[Exception]
Suite acceptance was not loaded
I have tried to google around to find any solution or to see if anybody have had the same exception raised but it seems that I am alone. What am I doing wrong? Or if I am not doing anything wrong, as it seems this may be some kind of bug.

The commands that I ran:

wget http://codeception.com/codecept.phar
php codecept.phar bootstrap
php codecept.phar generate:cept acceptance Welcome
Please, would someone try and guide me where to go now. How can I create a new acceptance test?

It says "Suite acceptance" so I tried to add an argument with the name "WebGuy" as it seems to be the name of the suite? But if I try to alter the number of commands it just gives me:

[RuntimeException]
Too many arguments.

Running on ubuntu parallel virtual server

Most helpful comment

For others who might run into this problem, I found that the "acceptance" files discussed above were not created in my bootstrap command.

It turned out that I was getting the following message when running the bootstrap command: Project already initialized at '.'

I deleted my tests folder and the codeception.yml file, ran the bootstrap again, and was golden.

All 9 comments

Now you have to go step 4 in quick start guide :)

On Tue, Sep 3, 2013 at 3:52 PM, Markus Stenqvist
[email protected]:

I were just trying out the Codeception testing suite since we thought we
need better testing, specially selenium tests. So I downloaded the phar
archive and began to run the quick start instructions available on
http://codeception.com/quickstart.

The problem occurs when I have created a new suite and were going to
generate an acceptance test. It just gives me an error:

[Exception]
Suite acceptance was not loaded
I have tried to google around to find any solution or to see if anybody
have had the same exception raised but it seems that I am alone. What am I
doing wrong?

The commands that I ran:

wget http://codeception.com/codecept.phar
php codecept.phar bootstrap
php codecept.phar generate:cept acceptance Welcome
Please, would someone try and guide me where to go now. How can I create a
new acceptance test?

It says "Suite acceptance" so I tried to add an argument with the name
"WebGuy" as it seems to be the name of the suite? But if I try to alter the
number of commands it just gives me:

[RuntimeException]
Too many arguments.

—
Reply to this email directly or view it on GitHubhttps://github.com/Codeception/Codeception/issues/530
.

The problem is that I can't build the tests I create manually either. Same error :S

0.o

  1. make sure file codeception.yml was created after bootstrap
  2. make sure tests/acceptance.suite.yml was created
  3. make sure dir tests/acceptance was created.
  4. ???
  5. IT MUST WORK

Ho @stonetwig

No need to worry there might be syntax error .. while running test case ... Codeception fully tested framework ..

Coming to your issue i just downloaded new file .. i run cases .. its working .

Just do the following :

Open Terminal :

then Go to Dekstop or any other folder ... Here i just did like this :

 // going to desktop folder

aditya@aaryan-Name:~$ cd Desktop           

 // Making new directory as newtest 

aditya@aaryan-Name:~$ mkdir newtest    

 // going to newtest folder

aditya@aaryan-Name:~$ cd newtest/            

// Downloading codecep.phar file

aditya@aaryan-Name:~/Desktop/newtest$ wget http://codeception.com/codecept.phar -O codecept.phar           

 // Generating files

aditya@aaryan-Name:~/Desktop/newtest$ php codecept.phar bootstrap       

//Creating welcome cept

aditya@aaryan-Name:~/Desktop/newtest$ php codecept.phar generate:cept acceptance welcome    

//running Test cases

aditya@aaryan-Name:~/Desktop/newtest$ php codecept.phar run acceptance welcomeCept.php --steps

Codeception PHP Testing Framework v1.6.6
Powered by PHPUnit 3.7.24 by Sebastian Bergmann.

Suite acceptance started
Trying to perform actions and see result (welcomeCept.php) - Ok


Time: 5 ms, Memory: 10.25Mb

Thats it ... Codeception is So simple but very powerful ...

ps: make sure that php installed in your system

@aditya- hi,

It seems when I try it out on my local machine it works just fine. So I guess there is nothing wrong with codeception at all but rather some problem with my parallel virtual machine. I have the files on my mac, the host, and maybe that's what causing the troubles?

If so, this is a trouble since I have my selenium server with headless firefox setup on my ubuntu server and I don't really want to run them locally on my mac (since all code, the correct php version and so on is installed on the virtual machine).

But I can generate all files with the phar archive using the bootstrap commands. It is just everything else, running the test suite, generating files and so on that doesn't work. Any experience in that? Seems like there might be some problems with the way I have set up the file sharing between my host (OSX) and my virtual ubuntu server (parallel). Parallel maybe can't write new files to the host system for some reason.. (I can do it from the terminal with bash though).

@DavertMik It does on my host, my mac but not on the parallel virtual machine. Read my response above.

Hi @stonetwig

once change hostname and try once because i am to using ubuntu in my virtual machine for running selenium test cases

You can set host name in Ubuntu like this

//to change hostname 

sudo hostname your-new-name

Then edit /etc/hosts and change the line which reads:

sudo nano /etc/hosts

127.0.1.1     your-old-hostname

So that it now contains your new hostname. (This is required otherwise many commands will cease functioning)

This will set the hostname to your-new-name until you restart. After a restart your changes in /etc/hostname will be used.

See

man hostname

and for running selenium test cases .. try the following configuration

Firefox version : 22

latest codeception file 

selenium-server-standalone-2.35.0

http://code.google.com/p/selenium/downloads/detail?name=selenium-server-standalone-2.35.0.jar&can=2&q=

I think it will work

For others who might run into this problem, I found that the "acceptance" files discussed above were not created in my bootstrap command.

It turned out that I was getting the following message when running the bootstrap command: Project already initialized at '.'

I deleted my tests folder and the codeception.yml file, ran the bootstrap again, and was golden.

Thanks whatknows!

@whatknows Thanks, It works perfectly.

Was this page helpful?
0 / 5 - 0 ratings