Testing a helpbook outside of an application - macos

I am creating a Help Book for my application. What would help a lot is if I could take the *.help bundle and load it into the help view directly for testing without using the application's Help menu option first.
Is this possible?

There's no special way to do this other than to build and run your app, then request help. The only thing to test would be that the help index was created properly (by searching for keywords) anyway. The rest you can test in Safari. It'll look the same.

Related

Breakpoint debugging in Appium

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")

Autocomplete + suggest search bar for nodejs express framework, using a mongodb database

I'm looking for an example to go off on how to setup a search bar for a project I'm working on.
I've got a mongodb database and am using nodejs with the express framework.
I'd like to have autocomplete and suggest functionality for the search bar.
I've had a look at typeahead.js but am overwhelmed by how to implement it. If anyone knows of a place to find a working version (that I can upload to my dev environment and take apart) or has the time to run be through it step by step, I'd be very grateful.
Alternatively if there is a much easier to achieve what I want to do, let me know.
Thanks in advance.
My recent research has shown a blog post that might be of help.
http://physalix.com/jquery-autocomplete-search-with-node-js-and-mongoose/
edit:
Sorry for the brevity, unfortunately I am of novice level with node.js so I don't want to submit code directly on here as I cannot confirm it has been tested and will work.
The link above does look like it will work and has been vetted on the original article post as functional. As a general example I believe this will definitely lead you in the right direction to a functioning search bar with the functionality you require.
Note this doesn't implement typeahead.js but works in a similar fashion.

IBM Worklight - Shell Component

When I have created a shell component, inside the shell component common folder there is folder called preview. I need to know what is the use of this folder. I am trying to understand about it using the following point specified in IBM modules.
preview: can be used to implement native functionality stubs for simulation in the Worklight Console preview instead of receiving exceptions
Still i am not having any clear idea about this. Can anyone give a clear idea about this.
Thanks in advance!
I believe that the main idea of the preview folder for shell component is to simulate its native behaviour, let's say for example you want to you the Google Maps API on a given area.
For the one developing the shell they do not have the final App, to test its behaviour. So, they can create some simulation such as a picture for a Map or a Picture of a Android TOAST, to allow them to work in the shell it self.

FirefoxOS device manifest

I'm trying to port FirefoxOS on Motorola G but I don't understand how to write device manifest. What should be specified in the manifest? Where do I start? Mozilla's official documentation isn't that helpful actually.
The manifest is tricky but like a bike - one you get the hang of it then it becomes second-nature.
Here are the links I used to understand the manifest:
https://developer.mozilla.org/en-US/Apps/Developing/Manifest
https://developer.mozilla.org/en-US/Apps/Developing/About_app_manifests?redirectlocale=en-US&redirectslug=Web%2FApps%2FFAQs%2FAbout_app_manifests
The main point that helped me was to understand that only two fields are required: name, and description. This make other options specific to your needs, so I stripped all other members out to start: "locales" and "developer".
The primary config that I needed to get right was:
launch_path - I got it to work through trial-and-error, but then moved the app within my architecture and was surprised when the app went 404! I shouldn't have been surprised because... the path was incorrect. After updating the path the app installed correctly.
For example:
/Apps/App1/app1.html
Final bit of advice on Manifest. The best way to understand it is to get a test app working from the mdn-app-template! This way you can see how it works and test it's capabilities. I strongly recommend this as a first step. https://github.com/chrisdavidmills/mdn-app-template
Other suggestions:
- It took a while to get the workflow down. It is possible to just click a 'refresh' link in the App Manager. Which is a rather immediate workflow.
- Uninstalling in Android was weird. The app is actually saved within Firefox. So you have to go to about:apps to uninstall. Here is the link: https://developer.mozilla.org/en-US/Apps/Developing/Apps_for_Android
Hope it helps.

Watin and Telerik Controls

I would like to ask if anybody knows an easy way to test Telerik controls with Watin.
We are about to start using it but before we do I wanted to see if there is anything I would need to know.
The problem that I can see we will be having is that if even smallest thing changes then all our tests will also break.
Any suggestion is greatly appreciated.
The problem that I can see we will be having is that if even smallest thing changes then all our tests will also break.
This could/will be true of all portions of your pages, including Telerik controls, depending on your test structure. Ideally, your elements will have IDs assigned and you'll use Page classes and custom control objects to remove all HTML references from your actual test code. Then if something changes on the webpage (or in a control), you verify the change is expected, then you change the WatiN page code (or control code) and re-run your tests.
The WatiN page class primer is here: http://watinandmore.blogspot.com/2009/06/introducing-page-class.html
Basically, you want to have your test code look like myPage.PickDate("3/29/2012") and not like ie.Tables[3].TableRows[2].TableCells[4].Textbox(Find.ByClass("datePicker")).TypeText("3/29/2012")
Changes can, do and should result in failing tests, however, I can attest that with a good page (or control) class setup that abstract away the HTML DOM and other specifics leaving non-HTML-filled test code, means that when changes do happen they are most often easy to get working again.
Note: Selenium also has a Page class concept, but I have not used it very much as of right now. Bottom line: If you write a lot of tests that reference the HTML DOM directly in test code, you're setting yourself up for a maintenance headache regardless of if you go with WatiN or Selenium or whatever.
Added: As to your original question: Can you work with Telerik controls in WatiN? Yes you can most likely, but depending on the control you may need to get a bit creative, possibly even calling javascript methods from within your test (page object ;) ). I've been stumped by a couple controls (non-Telerik) but most I've eventually figured out.
I realize you asked about WatiN, and I know I'll probably get downvoted into oblivion, but I might recommend Selenium instead. It seems to be more widely used and when we were evaluating the two we found Selenium easier to work with because of the Firefox plugin to record/generate the tests. This meant that our non-technical folks could set up the tests.
Since then we've successfully used Selenium to test ASP.NET sites that utilize Telerik controls. I only ran into one issue, with the RadNumericTextBoxes, which I've documented a fix for here: http://www.msigman.com/2012/02/entering-radnumerictextbox-selenium-webdriver-1-6-0/.
I'm currently in the process of writing a how-to guide for doing it: http://www.msigman.com/2012/03/automated-testing-asp-net-web-application/ (shameless plug).
You should also consider evaluating Telerik's Test Studio, our functional automation test tool. (Disclosure: I'm their evangelist for Test Studio.)
Test Studio really shines when you're working with Telerik controls. You'll get some great additional functionality around being able to dive deeper in to verifications and actions around the controls.
Even more importantly, Test Studio handles centralizing locators and pages by default, so you don't need any additional effort to best manage your UI changes.

Resources