API Testing using Cucumber - api

in APi Testing while writing code
its not accepting keyword "body"
throwing an error as "this method is undefined for particular class"
added dependencies with respect to REstassured and Testng still facing the error.
Please help me out

Related

Error find in Code-coverage jasmine task?

I have created simple web application project, for that I want to add the Code-Coverage task. I am facing issue regarding ‘except is undefined error’. I followed the below link for this. Can you suggest me for going forward from this issue?enter link description here

Codeception won't run any tests. Fails with no errors, quits before running any tests

I go to run an acceptance test, but it only outputs
Codeception PHP Testing Framework v2.0.12
Powered by PHPUnit 4.5.1 by Sebastian Bergmann and contributors.
Then it quits with out any error message. No tests run, no error message.
Browser tests were working fine, and only acceptance tests were broken.
I have all ready solved the problem, but I want to create a record for next time I or any one else runs into this problem.
If you codeception is quitting without any errors or fail messages, it means that there is an error in your code somewhere. I found the error in me Acceptance Helper file, where I had a duplicate of a function. Functions can not have the same name in php, so everything fails. But codeception does not output any error messages.
In order to solve this problem, you need to look through your Helper functions to find a syntax error, or it could be in your actual tests.
The reason it fails is codeception hits an error in the php code, and dies, not throwing any errors. Leaving you confused and frustrated. Now you can find this question and get back to doing what you're doing.
YAY!
There is a syntax error somewhere in your testing code, find it and get rid of it, and it will work. I'd bet the error is in the AcceptanceHelper.php or Browser or what ever suit won't run tests.
If you're seeing this behaviour (codeception quits without any error messages) there is likely a fatal PHP error happening somewhere, but it's not necessarily in your own code or in your codeception generated files.
Depending on your PHP configuration, these errors should show up in an error log, even if they're not output to the console.
For example, if you're using MAMP on Mac, the error log is here by default: /Applications/MAMP/logs/php_error.log
Clear the PHP error log, run your (non-working) test, and check the log again. It should give more insight.
In my case, it was a matter of running codeception 4 on Laravel 5.5, and hence missing classes from the symfony/service-contracts package. Installing this package with composer moved past the "invisible" problem (though I ultimately had to downgrade to composer 3, since there doesn't seem to be a compatible set of symfony/Laravel 5.5/composer 4 packages).

Laravel assertions full list

PHP Laravel framework provides assertion methods like ->assertTrue(), ->assertFalse() for unit testing. However, I cannot find a full list of them. Are they documented somewhere? If not, where can I find them in Laravel source?
Sure. Your test cases all should extend Illuminate\Foundation\Testing\TestCase. This class uses the Illuminate\Foundation\Testing\AssertTrait. Those are all the Laravel specific assertions.
View on github
However assertTrue and assertFalse are both part of PHPUnit itself. You can find a list of all PHPUnit assertions on the official website
Laravel uses PHPUnit and here is the list of phpunit assertions list:
https://gist.github.com/briankip/35e3506be8b1ecbcf3bb

django-jenkins ERROR: runTest (django_jenkins.tasks.lettuce_tests.LettuceTestCase)

I've been working with lettuce for interface testing for the last year and lately I've been trying to use it with django-jenkins for continuous integration.
However, I am having problems on executing only the lettuce tests cases I have into the app directory of my Django project.
When I run python manage.py jenkins I get the lettuce tests executed and the lettuce.xml file with the execution details created into the reports folder. Although I am getting two errors I don't know why (see the errors at the end of my post).
I've been trying to google it to see if someone else is having the same problem but I couldn't find anything. If anyone has any idea I will appreciate.
I've been following this tutorial.
You can check the error here
Here you can access my code on github.

Tools for automated functional testing of a static Dart web app?

Is anyone successfully running automated functional tests against a static Dart web app? If so, what automated tool(s) are you using?
I tried to run automated functional tests using HtmlUnit (a headless browser written in Java). It uses the Mozilla Rhino Javascript engine. But it failed while running tests. Here are two errors I got:
1) java.lang.RuntimeException: com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "RQ" from null (http://127.0.0.1/my/hab/settings.dart.js#6369)
2) java.lang.RuntimeException: com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function postMessage in object [object Window]. (http://127.0.0.1:3030/my/_dev/hab/dart-web/web/hab_list.dart.js#16070)
The authors of HtmlUnit say their Javascript support is good, but not great. Maybe the Javascript generated by dart2js is more than Rhino can handle at this time.
So I am asking if anyone is successfully using any other tools for automated functional tests.
I've heard of phantomjs (a headless Chrome browser I think). Rather than waste a lot of time investigating testing tools that may not work with dart2js generated code, I'd like to find tools that are known to work.
Thank you
I've had good experiences with PhantomJS, though not tested any dart2js code in it.
If you're worried about compatibility, I would test it directly through a browser (eg. something like Selenium). If it's running through a browser, you're in control of what the browser supports (your error suggests their browser does not support web workers), though it is a bit fiddlier to test up.