jayhealey / webception Goto Github PK
View Code? Open in Web Editor NEWA Web UI for running Codeception tests.
License: MIT License
A Web UI for running Codeception tests.
License: MIT License
Hi,
The drop-down containing sites is pointing to /?hash=... this breaks setups where webception live in /webception. Removing the / works for both dedicated virtual host setups and setups running as a subfolder of an existing VH.
Happy to submit a pull request if needed.
Thanks,
Y
As Codeception 2.x stable was released, it would be great to upgrade package as well.
Hi, I was installing Webception, but i saw it throws me error saying ,
Codeception isn't executable. Have you set executable rights to the following (try chmod o+x).
D:\CodeCeptionDemo\test\webception\App\Config/../../vendor/bin/codecept
I gave full security permission to thsi file, but still it throws me error.
Can someone suggest me something ??
Hey,
I've run into the following problem...
Codeception\Util\Mink module is not configured!
Provided URL can't be accessed by this driver.[curl] 6: Could not resolve host: localhost [url] http://localhost/admin/api/
I can open it just fine through the browser and postman.
This is my acceptance.suite.yml
class_name: WebGuy
modules:
enabled:
- PhpBrowser
- WebHelper
- REST
config:
REST:
url: 'http://localhost/admin/api/'
timeout: 90
PhpBrowser:
url: 'http://localhost/admin/api/'
And the test is as follows:
$I = new WebGuy($scenario);
$I->wantTo('Login');
$I->sendPOST('pages/login', [
'username' => 'admin',
'password' => 'admin'
]
);($I);
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContains('"success": true');
I'm using Windows. Any help is appreciated!
I used always the webdriver and launched a server with phantomjs
with the command:
phantomjs --webdriver=4444
in my general tests i works, but when I try to use it with webception it fails with this error:
��FAILURES!
���Tests: 1, Assertions: 0, Errors: 1.
Hi all,
I installed webception. I followed all the instructions, just one difference, I set an alias to "localhost/webception" that point to the public folder in webception, not a virtualhost dedicated.
When I launch the url "localhost/webception" the ajax checks for "executable status" and "log status" return with a 404 error.
The called urls are "localhost/webception/logs" and "localhost/webception/executable" . Are they right ?
It would be nice if we could manage the drivers (Selenium, PhantomJS, etc) that interact with browsers from within Webception.
I can imagine a drop-down menu in the navigation bar (or somewhere else) where we could start/stop these services and/or display the status of the processes (running/stopped).
The reason being is that I usually use PhantomJS but sometimes I prefer Selenium to see what is going on and I have to manually stop the former one and start the latter.
What do you think?
Is there a way to ignore some folders in project, like pageObject and stepObject folders?
i already use codeception more than 2 years, and this month i found webception, i also already install it and i have some request about the feature. or maybe you can give clue so i can try add to webception.
The following is feature requests:
Thank you very much
Hello,
To update codeception to 2.3.* you have to update symfony/yaml. But on Webception front end the "Environnements" menu disapears when you update "symfony/yaml" around 3.4.
Here is the configuration you have to keep on your composer.json
"require": {
"php": ">=5.3.0",
"slim/slim": "2.*",
"slim/views": "0.1.*",
"twig/twig": "~1.13",
"codeception/codeception": "2.3.*",
"symfony/yaml": "2.7.x-dev"
},
I'm getting the error in the title, now I know that I can easily fix this by changing max_execution_time in php.ini but I would rather place this in the code and thus use ini_set. My problem is that the setting is not taking effect when set within the code.
Where is the best place to place something like ini_set( 'max_execution_time', 0 );
Am I correct in assuming this isn't a good tool to run on wamp. Should be a lamp stack instead?
Would be great if you will support create-project
or some other kind of automated install, without downloading manually full package. Have you registered it on packagist? Thanks.
If the position becomes open give me a ring @Michaeljcalkins
This looks exciting!
Hi.
I've deleted some of my tests before launching new test run (and forgot to refresh the page), and Webception hang on the first nonexisting test (backend returned error 500, and js wouldn't continue from that point).
This is quite an unusual scenario, but i guess this may be included in buglist for next milestone.
when i try to use @$scenario->env('xxx'); in my cept file the output will be No tests executed! i did the setup of env in acceptance yml
env:
env2:
modules:
config:
WebDriver:
url: 'http://bb.dev/'
browser: 'firefox'
env3:
modules:
config:
WebDriver:
url: 'http://cc.dev/'
browser: 'firefox'
Type: UnexpectedValueException
Message: RecursiveDirectoryIterator::__construct(/tests/codeception/common/acceptance/): failed to open dir: No such file or directory
File: /webception/App/Lib/Codeception.php
Line: 134
I only have a unit
folder in there. If I create acceptance
and functional
folders in there then it will work.
I would like to choose an environment that allows the tests to run on Browserstack, from my local.
Any suggestions on how its done? I can do it from my computer with no problem, just not sure where to pass the parameters in webception.
Let's say I have a webshop and want to test all kinds of purchases (products, services, discounts, pay by credit card, etc). That means I need to create a lot of test suites. For instance, I have 100 tests (cept files).
It is not easy to find the one I want to deal with in the long list of tests.
Two suggestions:
/**
* @description here you can write a few words describing the test
*/
And you could search in these descriptions, too.
How's that sound?
When I click Run All
on Unit Tests section I expect to see all unit tests are selected/deselected, instaead all tests are selected/deselected.
First bug noticed )
Codeception offers detailed debug output when running tests. By default, Webception doesn't offer this as an option.
There should be a checkbox / option in the UI to allow more detailed debug output from Codeception (using -vvv parameter).
Thanks to Jeremy Coates (@phpcodemonkey) for the idea and example implementation.
Webception only shows 1 type of log file. It's not good idea why on console we can print with many type like html/xml/debug ... :( pls show to me how we can set it.
I'm running the current Webception trunk on a WAMP stack and I can't get it to run webdriver tests. So far I've tried several php versions.
I temporarily fixed the windows php.exe path problem by adding
PATH=%PATH%;"D:\xampp\php"
to the codecept.bat, so Webception is able to execute php.
However the run_terminal_command() in helper.php seems to infinitely loop at
while ($line = fgets($pipes[1])) {
...
}
and php throws an execution time error after some time.
Running the excat same project on OS X works just fine, so it's unlikely to be a misconfiguration
Another strange thing I noticed was, that on WAMP webceptions can't seem to get testpath right. Here is a debug trace of the $command (helper.php) variable. Note that the first few chars of the filepath are missing. Both issues could be related.
D:\xampp\htdocs\webception\App\Config/../../vendor/bin/codecept run --no-colors --config="D:\xampp\htdocs\webception/codeception.yml" acceptance ocs\webception\tests/acceptance\test\TestCept.php 2>&1
Has anybody been able to get webception running on WAMP?
Is there a way to trigger only a single test inside a Cest via the Webception Interface?
I like to do that via command line to test just a single test. Would be nice if that works via the interface.
@jayhealey I wonder if you can shed some light on this.
Some tests have some code to skip them if TERM or TERM_PROGRAM keys exist in $_SERVER.
It's causing them to be skipped via the web interface too. Before I consider removing them, can you explain why you added the skipping?
I've seen Webception is updated on Codeception website and I've tried to install Webception on my Win7 with Xampp but I got following error while installing:
D:\xampp\htdocs\Codeception>php composer.phar create-project jayhealey/webceptio
n --stability=dev
Installing jayhealey/webception (dev-master b0a6115cf9fb9a0328407f5fa76dd0ef0435
edd2)
- Installing jayhealey/webception (dev-master master)
Cloning master
Failed to download jayhealey/webception from source: Failed to clone git@github.
com:jayhealey/Webception.git, git was not found, check that it is installed and
in your PATH env.
'git' is not recognized as an internal or external command,
operable program or batch file.
Now trying to download from dist
- Installing jayhealey/webception (dev-master master)
Loading from cache
Created project in D:\xampp\htdocs\Codeception\webception
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for facebook/webdriver v0.3 -> satisfiable by faceboo
k/webdriver[v0.3].
- facebook/webdriver v0.3 requires php >=5.3.19 -> no matching package found
.
Problem 2
- facebook/webdriver v0.3 requires php >=5.3.19 -> no matching package found
.
- codeception/codeception 1.8.1 requires facebook/webdriver ~0.3 -> satisfia
ble by facebook/webdriver[v0.3].
- Installation request for codeception/codeception 1.8.1 -> satisfiable by c
odeception/codeception[1.8.1].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your min
imum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> f
or more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common
problems.
I've tried to update Codeception & Composer to the latest version and then install Webception again, but this problem still not be solved.
Please help to give me some advise. Thanks,
Khoa Nguyen
I just installed the Yii2 advanced template. I get this error when pointing sites to /tests/codeception.yml
Type: ErrorException
Code: 8
Message: Undefined index: tests
File: /mnt/devserverstorage/www/webception/App/Lib/Codeception.php
Line: 134
The contents of /tests/codeception.yml
include:
- codeception/common
- codeception/console
- codeception/backend
- codeception/frontend
paths:
log: codeception/_output
settings:
colors: true
As you can see, it doesn't have a tests
property in paths
.
Here's what is in /tests/codeception/common/codeception.yml
namespace: tests\codeception\common
actor: Tester
paths:
tests: .
log: _output
data: _data
helpers: _support
settings:
bootstrap: _bootstrap.php
suite_class: \PHPUnit_Framework_TestSuite
colors: true
memory_limit: 1024M
log: true
Other than that, it's a great UI!
When I run the tests I keep getting errors that it cant find certain classes. It seems to me that I must have something configured wrong.
My Codeception.yml:
actor: Tester
paths:
tests: tests
log: tests/_output
data: tests/_data
support: tests/_support
helpers: tests/_support/Helper
envs: tests/_envs
settings:
bootstrap: _bootstrap.php
colors: true
memory_limit: 1024M
modules:
enabled: [Laravel4]
config:
Db:
dsn: ''
user: ''
password: ''
dump: tests/_data/dump.sql
Running codeception via CLI in my applications directory works just fine, Webception seems to have problems finding classes in Laravel 4.
I'm actually installing WebCeption in a project with two main sets of tests: the main API tests, that reside in the project root, and an extension's unit tests, in a subdir.
Currently, while I add both codeception.yml
files to Webception, it crashes looking for an "api" folder inside the extension and an "unit" folder inside the main project tests.
Would be better if I could specify "I want api
tests for site X and unit, functional
tests for site Y".
Hello :)
I have used codeception 3.0.1 to write and run my tests. Now I'm trying to install webception and I see that it uses codeception 2.*. I wish to reuse my codeception 3.0.1, is it possible? How can I integrate them? By the way...I'm newbie on composer
Thanks a lot!
[RuntimeException] Call to undefined method WebGuy::pressKey
How fixed?
Thanks
Hi,
On Windows 2008 R2 server, the testCodeceptionCommandPath unit test fails because of --no-colors
Here's the output of codecept run unit:
1) CodeceptionClassTestsTest::testCodeceptionCommandPath
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'E:\inetpub\webception\App\Tests\_config/../../../vendor/bin/codecept run --config="E:\inetpub\webception\App\Tests\_config/codeception_pass.yml" unit WebceptionTestClassTest.php 2>&1'
+'E:\inetpub\webception\App\Tests\_config/../../../vendor/bin/codecept run --no-colors --config="E:\inetpub\webception\App\Tests\_config/codeception_pass.yml" unit WebceptionTestClassTest.php 2>&1'
#1 E:\inetpub\webception\App\Tests\unit\CodeceptionClassTestsTest.php:115
#2 CodeceptionClassTestsTest->testCodeceptionCommandPath
As far as I understand you are running Codeception via CLI only.
I think that can be much improved if Codeception will be run in the same process. At least this is how I thought about it.
Basically you will need nothing more then custom Extension for this. This way you can listen to events and update application status.
For example, provide custom output formatted for web. For example you can print test with all their steps, print assertion fails, insert screenshots, etc.
As I think of it - web interface can be just an interface and use all internal Codeception features. I know they are not all documented as needed, but I'm here and you can ask anything you need. Also in Skype: davert.ua
My project (sadly) runs over SVN, what means this sh!t includes .svn
folders everywhere. Thanks to that I have a bunch of files being recognized by WebCeption as tests, such as svn prop files, temp files and so on.
Given the fact that Webception humanifies the file names, I'm having a hard time ignoring manually each of those files - for example, I can't find the "Clean Model.svn-base" so-called test, so I can get it's proper name and ignore it (tried CleanModel.svn-base and CleanModel.svn-base.php and CleanModel.php.svn-base, no success).
I guess that adding something like "/svn/" or even a regex would suffice.
I'm running Webception in /webception/ (ie not as a subdomain).
The site switcher hard codes a / at the start of the URL.
I removed the / on my code base and now site switching works.
This can be done in template master.html
My env is:
Ubuntu 14.04
Apache 2.4.7
Webception located at /var/www/xxx and i can see UI with config passed, executable and logs are failed. I did all sudo commands twice to allow execute codeception by apache, and to log and cache directories.
Codeception executable via terminal but, in this case all acceptance tests are failed.
my acceptance.suite.yml as follow
class_name: WebGuy
modules:
enabled:
- PhpBrowser
- WebHelper
- WebDriver
- REST
config:
REST:
url: 'http://webception.org'
timeout: 90
PhpBrowser:
url: 'http://webception.org'
curl:
CURLOPT_RETURNTRANSFER: true
CURLOPT_FOLLOWLOCATION: true
WebDriver:
url: 'http://webception.org'
browser: firefox
window_size: 1024x768
wait: 10
How to write dockerfile to run webception?
I get the following error when running tests:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/nodebugnonzts20121212/intl.so' dlopen(/usr/lib/php/extensions/nodebugnonzts20121212/intl.so, 9): Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.53.dylib Referenced from: /usr/lib/php/extensions/nodebugnonzts20121212/intl.so Reason: image not found in Unknown on line 0 Codeception PHP Testing Framework v1.8.1 Powered by PHPUnit 3.7.28 by Sebastian Bergmann. PHP Fatal error: Class 'Codeception\Actor' not found in /Library/WebServer/Documents/project/tests/unit/UnitTester.php on line 27
As CodeCeption tests are almost a DSL that's easily readable by any dev and maybe even common users, would be cool to help understand what the tests does if we could look into the tests' code inside WebCeption.
Maybe a button that would popup a formatted version of the test's source-code would suffice. What do you think?
In order to improve the debugging Codeception tests as they run, it'd be useful to add a new configuration option to Webception for the XDEBUG_CONFIG idekey. The Webception UI will include an additional option to set the config before running the tests.
XDEBUG_CONFIG=“idekey=netbeans-xdebug"
vendor/bin/codecept run --config=“"
Thanks to Jeremy Coates (@phpcodemonkey) for the idea and example implementation.
hello,
I use Codeception with webdriver and use command line to launch test. I try to use webception to show it on a web-application for my colleagues so I deployed webception on my FTP but i have problems with piloting selenium. I didnt succeed to run the test from my ftp with webcept.
[WebDriverCurlException]
Curl error thrown for http POST to http://127.0.0.1:4444/wd/hub/session with params: {"desiredCapabilities":{"unexpectedAlertBehaviour":"accept","browserName":"firefox"}}
couldn't connect to host
Any suggestions will be welcome. thank you
I cannot call switchToNextTab WebDriver method, even though it is listed here. Why is this so?
New guy in both codeception and webception here!
Below is a copy of webception composer.json ( should be the latest )
"name": "jayhealey/webception",
"description": "Web Interface for running Codeception tests.",
"keywords": ["codeception", "webception", "testing", "php", "web interface"],
"homepage" : "https://github.com/jayhealey/Webception",
"authors": [
{
"name": "James Healey",
"email": "[email protected]",
"homepage": "http://twitter.com/jayhealey",
"role": "Developer"
}
],
"license": "MIT",
"require": {
"php": ">=5.3.0",
"slim/slim": "2.*",
"slim/views": "0.1.*",
"twig/twig": "~1.13",
"codeception/codeception": "2.*",
"symfony/yaml": "2.5.x-dev"
},
"autoload": {
"psr-0": {
"App": ""
}
}
}
Know bug/issue for windows, is_executable
returns false, for codecept/codecept.bat
. I think that this check could be removed. And some good windows support would be nice, because currently tests can be run on it, they all fail :)
Hello!
Is it strongly require for symfony/yaml version 2.5.*-dev?
Current version of CS use >=2.7, so we have version conflict on newer versions.
Maybe its need to upgrade version symfony/yaml for newer CS compatibility?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.