Telerik blogs

Latest

  • Productivity Testing

    Debugging Coded Steps in Test Studio Express (Visual Studio)

    Every test suite of any significance will require you to have some form of coded steps. As awesome as Test Studio is, there are always going to be things you’ll have to do via code. Test oracles to check your database or file system would be one example. Backing APIs for setup and teardown actions would be another. Sometimes it’s just handy to have a breakpoint where you can pull up Visual Studio’s Immediate window and do live queries of the web page’s Document Object Model (web apps) or Visual Tree/XAML Tree (Silverlight or WPF applications). I’ve just uploaded a ...
    May 27, 2021 1 min read
  • Productivity

    JustCode JavaScript Templates for WinJS

    I’ve been doing a lot of WinJS work recently, and I am an avid user of the JustCode Template functionality.  So, I thought I’d share my templates as I have them now, and will update this post as I update them or create more.  For more information on creating JustCode templates, please see this help content. For each template, I show my acronym in parenthesis.  For example, the first template’s acronym is “winjsfile”.  I also don’t show the results for every template, since some of them are obvious. Templates for New JavaScript File This template and the related templates following are used when I...
    May 27, 2021 2 min read
  • Productivity

    Future Mocking

    Mocking legacy code is hard. Especially, if it’s a third-party library and you have little control over how it’s written. It is even more difficult to unit test a type that is instantiated internally. One can argue that it should be refactored to accept dependencies via constructor injection.  However, constraints such as time, budget, experience with the offending code, or even access to the source often prevent paying down the technical debt accumulated in these legacy systems.   This post will show you how to mock an external library (concept) where it calls a login service class that cannot be sent...
    May 27, 2021 2 min read
  • Productivity Testing

    Use Visual Event To Explore JavaScript Events In Your Application

    Visual Event is a little tool I found. When I say that I "found" it - I literal discovered it after Google-ing "detect javascript events" or something to that effect. Neither Telerik nor I personally have any affiliation with the Visual Event product or its makers. Anyway the tool will help you determine what javascript events are associated with a particular control. Javascript events are a crucial part of UI automation. Good understanding of how and when they are employed in your app can save you a lot of trouble. 90% of the time switching your step to ...
    May 27, 2021 2 min read
  • Productivity

    Fixing Visual Studio 2012 Intellisense for WinJS Files

    I have been frustrated by Intellisense acting up when working on WinJS Windows Store applications.  Figure 1 is just an example of the quirky behavior that I’ve been experiencing: Image 1 Fortunately, the fix is extremely easy, and I picked it up from Adam Freeman’s book on Apress “Metro Revealed: Building Windows 8 apps with HTML5 and Javascript” Add references in your JavaScript files to ui.js and base.js.  You can do this by dragging the files from your solution explorer.  They are located by expanding Windows Library for JavaScript 1.0, and then the “js”  folder.  Make sure you include the triple swack at...
    May 27, 2021 1 min read