I wonder if there are better ways to debug cucumber.js test rather than logging on console.
It seems like CukeStall is related to my requirement, but I can't use it because my application is not node.js app.
Any help or comments are appreciated.
Related
Is there a way on how to set breakpoints in appium or get a better debugging experience than looking through logs and printing console.log() all the time?
I would like to be able to stop the test run in any step and see what are the values - proceed to next step and so on. I saw that this might be possible using IDE but is there a better integration solution? Also saw that cloud device providers provide similar logging solutions like https://www.browserstack.com/docs/app-automate/appium/set-up-tests/debugging-options but this is only on the cloud devices and I would like to see it localy.
Maybe a dependency that would include what I am asking for?
My setup is appium, webdriver.io, mocha.
Thank you in advance!
First of all, debug with IDE and BrowserStack logs it's not the same. I don't know why you need it, but the best way to debug is to use the IDE
enter image description here
enter image description here
enter image description here
Also, you can create your custom logger util, which will store all the events to log file and print it
And the last one is https://appium.io/docs/en/commands/session/events/get-events/
self.driver.execute_script("mobile: deviceInfo")
I'm experimenting with Cucumber/WebdriverIO UI tests using Webstorm (NodeJs platform). At certain steps I would really love to stop it in debug mode, check the retrieved element and see what can I do with it.
But unfortunately the Debug button is disabled and I couldn't find anything specific in Webstorm documentation as well.
If I can achieve my original goal (stopping a step and experimenting with the elements) without using Webstorm's Debug mode, that's totally fine for me.
Debugging Cucumber specs is not currently supported, please vote for WEB-15146
I'm not sure how this would work with Cucumber but WebdriverIO now has a debug command you can use
I have created a maven gwt project(2.7.0) and then integrated MVP4G into it.
All is working fine but now when I wanted to debug my code to understand the flow, I am not able to debug the code.
Maven goal : gwt:debug
I am running the above mentioned goal and then I am running remote application which is providing me and url and when i launch that url I am not able to debug the code.
Please can anyone guide me on how we should debug this?
Thanks in advance
To Debug, just add the sdbg plugin (take a look here) or debug inside the browser if you are familiar with browser debugging. I think Chrome is the best choice. Credits:El Hoss
I am looking into getting involved with the rather exciting node.js, but I'm trying to find ways to replace my current development environment.
At present, my best friend in PHPLand is FirePHP module for Firebug, which is a god send as far as debugging your PHP goes. What methods do I have at my disposal for debugging node code? Does it output errors and warnings like PHP can be set to?
There are multiple ways to debug node.
node debug app.js
node-inspector
console
util
Personally I use a lot of well place console.log, console.dir and util.inspect statements throughout my code and follow the logic that way.
Of course unit tests come hand in hand with debugging. Write tests that assert your code work. The unit tests will cover catching most of the bugs.
You must write unit tests for your node.js code. nodeunit is great for general testing.
If your using express as your web engine then use expresso
In working on a firefox addon, i've found the task of unit testing to be kinda janky and difficult to setup. Anyone have recommendations on how to setup unit tests for an addon? Any tools or additional addons found to be helpful?
I've found Mozmill [ https://addons.mozilla.org/en-US/firefox/addon/9018 ], which I think will be useful to an extent, but it's more of a high level tool and i'm looking for a tool or approach that works for more low level testing.
How about UxU ( https://addons.mozilla.org/en-US/firefox/addon/6357 ) ?
I used code-level unit testing with Mozmill. I "hooked" resource:// path of Mozmill by programmatically adding testing add-on (Urim) path to it in test initialization (setupModule function). As the result i can test any peace of code of my testing add-on like it is own code of Mozmill. Look here for an example. As i understand, this is you are looking for.
The new JetPack Add-On SDK they are working on for Firefox 4.0 has testing built in. It isn't documented yet though, but it's something to watch. It looks like you run "cfx test" which will run the tests.
Some links:
JetPack - https://jetpack.mozillalabs.com/
Add-On SDK Documentation - https://jetpack.mozillalabs.com/sdk/1.0b2/docs/
Add-On SDK Test Harness - https://builder.addons.mozilla.org/api/test-harness
Also see http://paulgu.com/wiki/Unit_Testing_Framework. I haven't used it, but it seems like a simpler and lighter-weight approach that might be easier to integrate. I think it could be better packaged to make it easier to add to an existing extension, but that is probably a straightforward refactoring.
WebDriver or Selenium?