Codeception looking for external server - yii

I finally handled that Yii1 and YiiBridge install instructions and run some sample test. The problem now is, instead use my localhost, PHPBrowser is going to an unknown server from LAN, which obviously fails all tests. Is there any configuration that can prevent this?
edit: Refs
https://codeception.com/docs/modules/Yii1.html
https://github.com/Codeception/YiiBridge

Related

how to properly see the errors of a flask application in production mode

I have made a flask application at my local computer in the debugging mode and it runs all fine. But when it comes to production, the website gives me 500 or internal server error, which I have no idea what the bug is. I am fairly new to flask production and this has been stopping me from moving forward for quite a few days.
My questions are:
1> in my local development environment, one could always print things out. But how can I see those prints in the production stage?
2> Do I see them through Apache2 log? Where is Apache2 log?
For production, I actually followed the tutorials from pythonprogramming.net. Youtube link is here:
https://www.youtube.com/watch?v=qZNL4Ku1UQg&list=PLQVvvaa0QuDc_owjTbIY4rbgXOFkUYOUB&index=2
To use a very simple example, if the code imports a package which wasn't installed, where can we see the errors?
Thanks in advance.
I've tried to use to use try ... except block for every flask function. Whenever there is an exception, it can be return to the front-end. But what about other errors?
I found out:
Use logging module
Read apache2 log from /var/log/apache2

Testlink Jenkins result integration not working

I want to sync automation result from jenkins to testlink. I tried with Testlink -jenking plugin and testlink-api-client but not worked getting error.
Pre-setup :
$tlCfg-> api-> enabled
$tlCfg-> exec_cfg-> enable_test_automation
From Testlink UI enable automation for the project.
Test code :
TestLinkAPIClient testlinkAPIClient = new TestLinkAPIClient(APIKEY, "http://localhost/testlink/lib/api/xmlrpc/v1/xmlrpc.php");
testlinkAPIClient.reportTestCaseResult(Project, TestPlan, TEST_CASE, Build, notes/comments, teststatus);
output :
"testlink.api.java.client.TestLinkAPIException: The call to the xml-rpc client failed.".
References used :satishjohn.wordpress.com
2. softwaretestinghelp.com
and other stackoverflow threads.
I browsed and try out defined steps from some of the blogs but still facing same issue?. Can anyone help me to resolve this issue or other approach on sync result with testlink ?.
I believe you should follow the documentation(1) written by kino who wrote the plugin.We recently managed to sync automation results from Jenkins to Testlink by following above doc.Our auto tests were written based on testng framework, Hence we used "testng-results.xml" and TestNg method name based result seeking strategy.
We didn't come across an issue as you mentioned. From (2) and (3) you can get the plugin source .My advice is to debug the code after enabling the debug on Jenkins hosted tomcat server. So you can find the actual cause of the issue by yourself.
Reference:
(1) https://wiki.jenkins-ci.org/download/attachments/753702/jenkins.pdf
(2) https://github.com/jenkinsci/testlink-plugin
(3) https://github.com/kinow/testlink-java-apienter code here
You can run wireshark and filter on port "tcp port http" to see exact error you get from the server. When it was not working for us we were getting 200 OK with text "XML-RPC server accepts POST requests only."
You can also check /var/log/apache2/error.log for testlink errors.
We fixed the issue by setting following config in config.inc.php and restarting apache.
$tlCfg->api->enabled = TRUE;
$tlCfg->exec_cfg->enable_test_automation = ENABLED;

How to start Apache Traffic Server in MAC OS?

I have installed the Apache Traffic Server using the following instructions:
https://cwiki.apache.org/confluence/display/TS/Mac+OS+X
How I can start it and test?
To start ATS: /usr/local/bin/trafficserver start
If you wish to just test/check if trafficserver is running then you could do http://localhost:8080 and you would get "Not Found on Accelerator" since your mapping rules(in remap.config) are not setup yet. Beyond this, depending on your usecase(reverse or forward proxying), you would have to do some configurations and only be able to test thereafter, your respective usecase.

What is proper way for fixtures while using chimp with Meteor

I'm playing with chimp testing tool. At the moment I can easily run cucumber and mocha tests. The problem is that I don't know how to add DB fixtures. I'd like to have initial data before running some tests (e.g. add test user into system).
BTW that data can be added only by authenticated user and users can be create only by admin or from server level.
Can't find any docs about this for now. Any suggestions?
If you are using Meteor, you can pass the DDP parameter on the command line --DDP=http://localhost:3000 and then use server.execute to run code on the server. This code can then setup data.
If you are not using Meteor, you can use a HTTP call using request.get('http://localhost:8080/addUser').
Through HTTP / DDP you can access the server and create a testing backdoor to setup the data you need.

Meteor Velocity/Jasmine fails to start Karma through proxy

I am attempting to test a meteor application using Jasmine built on Velocity. When I test the application behind our corporate proxy, Karma does not start, the tests don't run, and I get this error in my Jasmine logs:
stream error Error during WebSocket handshake: Unexpected response code: 301
Presumably because it cannot connect to Karma.
I have tried this outside of our intranet (with no proxy), and it works just fine. Unfortunately, it isn't really feasible to run tests outside of our network.
Is there a setting that I am missing that would make this work?
Edit:
I have answered my own question just in case it is helpful to anyone who is having the same problem, but I'm open to other solutions. I will accept another solution if it solves this problem.
I am not sure if this is the best way to handle this, but I have gotten karma to launch and the tests to run by unsetting my http proxy environment variable (setting it to "" also works).
$ unset HTTP_PROXY
$ meteor
or start meteor with an inline env variable
$ HTTP_PROXY="" meteor