Installing Codeception without local web application - codeception

Can I install and use Codeception without a web application stored locally? I tried downloading codecept.phar to its own directory, but when I run "php codecept.phar bootstrap" I get "c??????" in front of my console prompt. Please advise, thanks.

Short answer: yes. Longer answer: I needed to upgrade my version of PHP.

Related

GNOME Shell integration extension is running, native host connector is not detected?

I have followed these steps while installing the gnome extension of chromium in Ubuntu 20.04.
Installed the GNOME Shell integration extension on chromium.
As per their documentation ran a command to install chrome-gnome-shell
sudo apt-get install chrome-gnome-shell
Still while loading the gnome-extensions page, it is showing error that "Although GNOME Shell integration extension is running, native host connector is not detected. Refer documentation for instructions about installing connector."
Can anyone tell me how to resolve this issue in steps?
FYI: starting from Ubuntu 21.10 Firefox comes as a default browser and as a snap, as well as Chromium. And has the same problem: GNOME Shell integration shows the same error.
Other ways to install the extensions are:
gnome-extensions install --force your_downloaded_extension.zip
unzip your_downloaded_extension.zip ~/.local/share/gnome-shell/extensions/
Probably this is because you are running Chromium as a Snap. There is an open bug in Launchpad about this, that appears to still be happening in Ubuntu 20.04 (still happening in Ubuntu 22.04):
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1741074
The easiest solution would probably be to use another web browser, not in a Snap.
I experienced this issue when upgrading from Ubuntu 21.04 to Ubuntu 22.04 (Jammy Jellyfish), where Firefox was installed via snap - supposedly the sandboxing made it unable to detect.
My resolution (which brought back gnome extensions connector being seen) was to install firefox manually by debian package via the directions in https://balintreczey.hu/blog/firefox-on-ubuntu-22-04-from-deb-not-from-snap/ . You may also be able to install the direct tarball following directions in https://fostips.com/install-latest-firefox-non-esr-debian/
Another option is to use a native extension manager as suggested in https://haydenjames.io/ubuntu-22-04-install-gnome-extensions-manager-workaround/
I solved using Chrome and not more Firefox for extensions.gnome.
(I use Chrome just for manage this extension)
If you still got problems, you could simply do this:
sudo apt-get reinstall chrome-gnome-shell
For me it did work after all, but just by using another browser - Firefox
I'm using Ubuntu 20.10 and I also had this issue. I was using Chromium but I found that Chromium dropped support for this, therefore I installed Firefox from the software. This did not work either.
The fix was to uninstall Firefox from software and install Firefox from ubuntu software with the source: ubuntu-groovy-updates-main
I installed the browser extension on there and it worked perfectly.
Aevin J He gave the answer if you're on ubuntu 21.10. it really matters whom you install it from. don't use the default one, use the one with most reviews

Does Chromium headless work on Windows Server Core 2016?

Background
I am tasked with replacing our IE based printing logic with Chromium so that we can eventually support running our current server software on Windows Server Core or potentially other operating systems that support .Net Core. My current thought is to either use Chromium embedded framework or to make use of Puppeteer. I am leaning towards the later because I feel it would be easier to port between operating systems.
Issue
Originally it failed to start with an error about sandboxing so I added the no-sandbox flag. Now when I try to load Chromium it fails to start with the exception below stating that it cannot load chrome.dll
PS C:\Program Files (x86)\Google\Chrome\Application>> .\chrome --headless --enable-logging --disable-gpu --screenshot="C:\screen.png" "https://www.chromestatus.com/"
Which yields the following error in the debug.log file:
[0813/133208.016:ERROR:main_dll_loader_win.cc(134)] Failed to load Chrome DLL from c:\Program Files (x86)\Google\Chrome\Application\68.0.3440.106\chrome.dll: The specified module could not be found. (0x7E)
I have checked around the internet and found a few mentions of this error but the suggested fixes don't seem to fix the issue.
I was able to download Chromium 72.0.3592.0 via Chocolatey and the issue is resolved in that version. I tested using Server Core 2016 LTSB.
choco install chromium --pre -y
chrome --headless --disable-gpu --dump-dom --enable-logging https://www.chromestatus.com/ --no-first-run
Edit:
If you are attempting to run Selenium Tests using Docker windowsservercore and chromium: The command line tests of chromium chrome.exe appear to never work from the container command line.
However when you run dotnet test app.csproj or dotnet vstest app.dll inside the container the webdriver successfully starts and drives the browser
This has been reported to the Chromium team. It appears that Chromium 68+ might have issues with Windows Server 2016.
https://bugs.chromium.org/p/chromium/issues/detail?id=873097

Testing with Web Driver and Selenium through Codeception

I know I'll get crap for this but it's worth it if someone can help.
I can't find a guide, tutorial, or instructions anywhere for installing web driver on a windows machine. I've got a site running on a homestead vagrant box and need a way of running acceptance tests locally. I had tests setup using PhpBrowser but those don't simulate JavaScript. If anyone knows of a guide to do this or a better way to run acceptance tests it would help immensely. I've got Ajax calls so PhpBrowser and resources like it won't work.
Thanks!
Just download the selenium webserver the jar file and run it in a command shell with java -jar selenium-server-standalone-2.43.1.jar. The selenium server will now listen on the default port 4444. If you run your test it should work as expected. Keep in mind that selenium webserver opens firefox and uses it for testing. It's pretty useful for watching the test cases.
If you want a headless test (no visible browser) you need to download phantomjs. Unpack it and run the phantomjs.exe with --webdriver=4444 as an argument (so phantomjs.exe --webdriver=4444).
Download and Run the selenium-server-standalone-2.43.1.jar as stated in the comment. I had to add firefox_binary: C:\Program Files (x86)\Mozilla Firefox\firefox.exe under capabilities: in my acceptance.suite.yml file. I also added it to the path variable but I'm not sure if that made a difference. Had to add the firefox_binary to make it work.

installing phonegap on windows7 error

I am a web developer and new to Phonegap..
I was trying to install phone gap on my windows 7 machine as per described here
http://docs.phonegap.com/en/3.1.0/guide_cli_index.md.html#The%20Command-line%20Interface
but when i run the following command
cordova platform add android
i am getting the following error
[Error: An error occured during creation of android sub-project.
ERROR : executing command 'ant', make sure you have ant installed and added to y
our path.
]
does this mean that i should install apache ant on my machine ? if so can someone redirect me to right link.
I am also running wampserver on my machine for my other developments..
will installing 'ant' affect on my wamp ?
As described in PhoneGap Getting Started
Finally, you may need to include %ANT_HOME%\bin to your PATH as well. To check to see if this is required, run a command prompt and type ant. If the program can not be found add %ANT_HOME%\bin to the PATH. You may need to specify the full path instead of using the %ANT_HOME% environment variable.
If you need ant for Windows, you may want to download and install it from here
You need ant to add the android platform.
Ant is a java-based build tool.
You can get further informations and download it at http://ant.apache.org.
ant has nothing to do with the apache webserver and doesn't effect your wamp installation. It's another software product provided by the apache foundation.
lg
fastrde

DalekJS: tests are not running, at all

Here's my set up on Ubuntu
dalek and dalek-cli installed as instructed in the website, the version is displayed correctly
phantomjs was installed via npm install but the phantomjs command could not be run
installed phantomjs via apt-get ... now I have version 1.4
in the folder /var/www/first_tests/ I have the package.json file provided in the website along with a subfolder tests containing first.js with the google example provided
I am in my homedirectory since that's the only place I can call dalek (I'm guessing because that where I was when I installed it) so I'm doing
dalekjs /var/www/first_tests/tests/*.js
The console shows "Running tests" but nothing happens. Trying to run
phantomjs /var/www/first_tests/tests/first.js
gives me "undefined:0 ReferenceError: Can't find variable: module"
Dalek expects the PhantomJS binary in the:
node_modules/dalekjs/node_modules/dalek-browser-phantomjs/node_modules/phantomjs/bin
Folder. Also, it definitely needs version 1.9.0 or higher.
You could try to download the binary from the PhantomJS homepage & manually copy it to the folder mentioned above.
It would be awesome, if you could send me (dalekjs#asciidisco.com) the npm debug log,
so that I can check why this happened in the first place.