Tag: mobile apps

  • Why Aren’t Enterprises Developing More Mobile Apps?

    Why Aren’t Enterprises Developing More Mobile Apps?

    We live in a mobile age, and enterprise IT leaders recognize it. But even though 64.5% of enterprises say that mobility is a top IT priority, most won’t deploy more than five mobile apps this year, according to a December study from Enterprise Mobility Forum. That’s a very small number, especially considering that large organizations manage an average of 163 apps, according to an Okta study. It begs the question: Why so few, especially given the strong demand for a mobile experience from employees, customers and partners?

    There are many barriers to enterprise mobile app development and deployment, but the biggest is simply a lack of time and resources. Modern organizations rely on web apps for critical internal processes, and development teams are expected to continuously roll out new capabilities. When presented with a choice between releasing new functionality or converting old web apps to iOS or Android, enterprise developers don’t have the resources to do both. Releasing new features will almost always win out, especially since a single conversion to mobile could require months of developer-hours and hundreds of thousands of dollars.

    What’s more, mobile development skills for the two biggest operating systems—iOS and Android—are already in short supply and specialized mobile security skills are even more scarce. So, even if the team is willing, it may not possess the expertise to create a secure app.

    Lack of a Robust Mobile Infrastructure

    Mobile apps require a robust infrastructure to support them and it differs significantly from the web app infrastructure that most organizations already operate. For example, to distribute and manage mobile apps on its own, enterprise IT has to set up a proprietary app store, and they’ll need to install enterprise device management software on all devices, including employees’ personal phones. Employees’ devices will initially warn them that the software is not trusted, requiring a number of steps to bypass, plus there are serious privacy concerns. Who would willingly give their employer access to all activity on their personal mobile device?

    Finally, regarding SaaS applications, if the vendor doesn’t provide a native mobile version, obtaining the binary to convert it to mobile in-house is almost impossible. And while many SaaS applications incorporate responsive design, mobile browsers provide poor performance and lack features such as persistence and push notifications.

    “Our customers have dozens of web and cloud services that they need to integrate into their enterprise mobile environment,” said Marcelo Nascimento, head of cybersecurity at TIQS Consultoria Brazil. “But the lack of mobile development resources or access to mobile binaries from app makers has halted their progress.”

    Public App Stores and PWAs

    Thankfully, there are solutions to each of these challenges. For instance, enterprises no longer need to manage distribution and management in-house. Increasingly, Fortune 1000 companies are using public app stores to distribute their internal employee-facing apps, according to a December study conducted by Appdome. Going this route eliminates the need to set up a proprietary app store and place management software on personal devices.

    When it comes to converting web apps to mobile apps, traditional progressive web apps (PWAs) can provide a fast, cost-effective solution. But PWAs and web clips have their limitations.

    Ideally, enterprises would be able to create hybrid apps, because they can provide both the benefits of the PWA for rendering web and cloud service apps along with a high-performance user experience and persistence. Platforms are available to conduct the conversion in minutes with no manual coding and some are able to incorporate strong security. As a result, an organization can rapidly convert web apps into mobile apps and distribute them via any distribution method, from private UEM and MAM stores to Google Play and the Apple App Store.

    So there’s no reason enterprise IT needs to shy away from providing everyone a mobile experience. With auto-build systems to create secure hybrid apps, enterprises can overcome most of the barriers and deploy secure mobile apps at scale.

  • APM and Application Stability: Where Two Monitoring Roads Merge and Diverge

    APM and Application Stability: Where Two Monitoring Roads Merge and Diverge

    In software development, application performance management (APM) is one of the grown-ups in the room. Not only has APM been around for a long time, but its solutions have evolved over several generations, making it one of the more mature product categories. 

    APM’s longevity makes perfect sense when you consider its fundamental purpose, which is to provide organizations with a way to understand the performance characteristics of their software. Value is delivered by alerting infrastructure teams when applications are performing slowly or poorly, and APM has the vast experience to do this job well. 

    If APM is one of the old-timers in software development, then application stability is the new kid in town. With the rise of mobile apps and iterative development releases, application stability has answered the widespread need to monitor applications in a new way, shifting the focus from servers and networks to the customer experience. 

    The emergence of application stability has caused some consternation for die-hard APM fans. However, these two solutions embody very distinct monitoring focuses, which leads me to believe there’s room for both tools, as well as different teams for both.

    APM: The Engine for Infrastructure and DevOps Teams

    Before the cloud, organizations supplied their own physical hardware and monitored components such as RAM, disk space, CPU and memory. If you ran out of any of these resources, you were screwed. 

    And that was the beauty of APM: It enabled the people running the applications to anticipate when they’d need more resources. 

    Of course, rather than monitor physical machines, today’s infrastructure, SRE and DevOps teams monitor cloud instances. Gone are the days of running out to Best Buy and lugging back new hardware. Instead, a simple request for a new instance is submitted to a cloud provider, and instant access is received. 

    Rather than make APM obsolete, as some feared, the cloud presents two good reasons for continued reliance on this tool.

    1. Apps Can Be Resource Hogs: A cloud instance is simply a slice of someone else’s computer, which means you still need to know when you’re close to running out of resources on this virtual machine. In fact, extra care is needed these days because you’re likely to run out of space more quickly.
    2. Money Still Doesn’t Grow on Trees: The ease of access to infinite cloud resources means that software companies may fall into the habit of throwing money at problems rather than figuring out how to streamline usage and costs through better efficiency. Companies can end up paying a ton of money to run apps if they continuously spin up more cloud instances without thorough consideration of the cost and need.

    And that’s where APM steps in. Its main purpose is to help infrastructure teams figure out capacity planning. With the cloud, questions shift to include:

    • How can I better manage my cloud instances and optimize usage? 
    • How can I make sure I don’t give ludicrous amounts of money to cloud providers? 
    • How can we tweak and optimize the cloud to reduce costs?

    These are the types of things that APM does extremely well. Anytime you need to figure out how to optimize your current resources or when to buy a new server or cloud instance, APM tells you. This information is invaluable to the people running the applications, namely the infrastructure or DevOps team.

    Application Stability: Where the Tires Meet the Road for Engineering Teams

    Now, let’s be honest, APM doesn’t have its strongest showing when the person who runs the app is also the person who builds the app. And that’s exactly the scenario presented by mobile development and iterative coding. 

    Rather than going through long development cycles, software now gets pushed to the web on a daily basis, and mobile apps tend to have weekly or biweekly release cycles. This release speed is not only encouraged but expected in agile software development.

    That means the chasm between building and running apps has shrunk, especially for mobile apps. More often than not, the people building the apps are the people releasing them. There is no gap. And, with mobile, companies no longer need to worry about expensive physical hardware but rather about the end user experience. The customer becomes the focus.

    Unfortunately, APM is perhaps a little too set in its ways to help you do that. But it’s not APM’s fault. These requirements are not what APM is inherently built to do. It’s great at detecting problems and alerting infrastructure teams so they can toss the issue over the fence to the development team. However, its core strength isn’t providing information on how to fix the problems because it wasn’t built with the developer audience in mind. 

    Trying to refactor APM to help with stability and error issues is like tuning your engine when you have flat tires. They are completely separate components of the car, built for different purposes. You can tune the engine all you want, but it isn’t going to move the car unless you focus on why there isn’t air in the tires.

    In today’s iterative world, development teams care a lot more about how apps are running. There’s a demand for fixing actionable items. Developers want to know exactly what’s broken, what to fix right now and what can wait. In short, developers want aggregation and automation of errors. They want to know, “Do we build or fix?” 

    This trade-off between building new features versus fixing bugs is one of the key factors behind the adoption of application stability management tools. Developers need answers to several questions:

    • Where are the errors in the code?
    • How can we get to those bugs and fix them as soon as possible?
    • How can we tie bug fixing into our planning for the week? 

    Whether running sprints or building in an agile manner, development work is planned in advance. Developers want to figure out how much new feature work will be included in a sprint versus how much bug fixing is required. And they need a tool that helps them automate the answer to that question.

    Benefits of Application Stability

    The beauty of application stability is that it brings together the errors captured by APM and enables developers to see at a glance which ones are worth fixing. As a result, five major benefits arise.

    1. Increased Efficiency: Companies eliminate the problem of infrastructure teams tossing issues over the fence to development teams. Valuable time is saved because application stability tools remove the game of telephone between the two teams and deliver bugs directly to the team that will fix them.
    2. Stronger CSAT: The time to fix bugs goes down dramatically when the person who wrote the code fixes the code. With diagnostic information in hand from the application stability tool, software engineers innately understand what the code does, what the bug means and how to fix it. Faster resolution of bugs that impact the end user experience means that customer satisfaction levels (CSAT) are less likely to drop.
    3. Error Prioritization: Application stability tools group bugs by root cause, making it easy for developers to get a sense of severity at a glance. It’s much easier to determine what to fix first when developers can see which errors are most costly, which affect the most customers, and which bug is impacting a key customer.
    4. Tool Synchronization: Taking it one step further, application stability tools are tied into project management suites. Bugs map directly to tickets created in Jira (or whatever tool is used), and tickets update automatically as priority changes.
    5. Stability Scores by Release: Application stability enables product and development teams to see stability scores by release. Since it’s common to have multiple app versions live at the same time, especially with mobile apps (where DevOps isn’t really involved), companies can’t rely on a single stability score. Teams need to see stability by release so that it’s clear exactly where the errors are and what impact they’re having on users.

    What Percentage of Your Development Team Has a Login to Your APM?

    I’m often asked whether I think application stability will replace APM, and my answer is simple: no, I don’t. APM remains an essential part of developing software, and organizations still need to understand when they’re about to run out of resources and when there’s poor performance. 

    Instead, I see these two solutions co-existing as adjacent categories but helping different teams. Application stability delivers prioritized errors to developers for fixing, while APM works well for enabling ops teams to raise red flags on high error rates and reduce cloud spend.

    Some of you may be thinking to yourself, “Well, my APM product does what you’re describing for application stability, so I’m sure my developers are fine using it.” To which I poise the following challenge: What percentage of your dev team has a login to your APM? What percentage logs in on a daily basis? And, if they do use it, do your developers like it?

    The answers to these questions may surprise you. After all, APM wasn’t really built for developers or for keeping end users happy. In contrast, application stability was born at the customer layer and is designed specifically to monitor the front end and ensure strong customer experiences with web and mobile apps. 

    Once you’ve had a chance to hear from your dev team, it wouldn’t surprise me if you discover that they’re pretty excited about the new kid in town.

    — James Smith

  • How to Build a Home-Screen Worthy CX

    How to Build a Home-Screen Worthy CX

    I’ve built apps, in some shape or form, for about 20 years now. During this time, I’ve always started the same way—design the user interface, build the backend services and connect everything together, adding in appropriate logic along the way. Recently, however, I’ve noticed that my design philosophy has changed. It’s less about how screen A interacts with screen B and more about how the app works naturally with the way the user interacts with everything else on their phone and the world around them. 

    Consumer expectations of apps have changed to something far less rigid than individual app silos. It got me thinking, what does this new consumer experience mean for app developers like me? I realized that I had started designing apps based around this notion that I wanted my apps to be worthy of being on someone’s home-screen. The more I thought about it though, the home-screen was my way of defining a design philosophy that I had unknowingly been building for. 

    Get on the Home-Screen

    The Google.com homepage used to be considered the most valuable space on the internet. Today, this is the home-screen of mobile phones, with companies such as Facebook, Google, Apple and Amazon all battling for dominance. In fact,  2 in 3 users in the U.S. keep their most used app front and center on the home-screen, with 21% of 18-34 year olds deleting apps because they didn’t like the way it looked on their home-screen. That’s a scary thought.

    As much as we would love to create the next app which users can add to their home-screen, the likelihood of that is pretty slim. It doesn’t mean you can’t tap into the success of these apps, though. Rather than trying to build an app which competes against social giants, you can use their reach to get your service in the hands of more users.

    When designing your UI, don’t think of your app as a walled garden that users have to open to use. To be successful, think about the CX of your service as it may appear in other apps—specifically those already on the home-screen. Digital disruptors, such as Lime and Uber, are leading the charge through integrations with apps like Google Maps.

    We are also seeing more traditional companies like Spirit Airlines allowing airlines to buy flights and change reservations directly through WhatsApp. Vero, the new kid on the social media block with an estimated 3 million users since it’s launch in March 2018, offers app developers an amazing opportunity for their service to be discovered early, and secure a place on the home-screen.

    Build for the Message, Not the App

    With social media now a part of the fabric of our lives, it is no surprise that communications and social apps are the most popular category of mobile apps. This gives mobile app developers a huge opportunity to improve the CX of their apps—as it is a pretty safe bet that almost every user has the capability to receive some sort of social media message, and every single phone has the ability to send and receive text messages. 

    When building your next app, in addition to designing the screens, make sure you design the message flow. Ask yourself, is the message urgent? If so, utilize text messages or push notifications to immediately capture a user’s attention. If the message is not urgent and more likely something a user may want to search for, rather than forcing the user to log into your app to find an order or receipt, why not use email as that archival system of record? With nearly 4 billion email accounts worldwide, and 90% of users checking their emails at least once a day, even if a user doesn’t have your app installed, they will still be able to find important records about your service. What’s more, most customers want the option to choose which channel they receive messages on. Knowing a user’s preferred channel for engagement helps developers build a better experience.

    The Lock-Screen Is the Next Battleground

    Let’s take a step further. What happens if you design the app without a UI at all? Doing so removes all of the distractions and forces you to think about how a user will gain value from your app. What are the services you need? What is the process you would follow? How will you get users’ attention? This last point—attention—is critical. With people’s attention span lasting approximately 8 seconds, building your app to grab someone’s attention at the right time is important. We’ve all been bombarded with spam and robocalls that constantly fight for a slice of that 8 seconds. Our natural inclination is to block out all messages. To solve this, I’ve started designing my apps around the notion of getting on the lock-screen.

    If you think about it, the lock-screen is even more valuable than your phone’s home-screen. To have your app or message appear on the home-screen, the user has to explicitly allow it, thereby signaling the importance of your service. This is incredibly powerful for an app developer to consider, especially when wearables, smart homes, connected devices, cars, etc., continue to grow and expand the potential surface that your users could engage with your app. Next time you build an app, consider how your app will grab someone’s attention via the lock-screen, then challenge yourself to think how you would do it if there was no UI at all.

    Winning the CX Battle

    A home-screen worthy design breaks down the boundaries of traditional mobile app development. Gone are the rigid constraints that a user must do everything with your app. By approaching app design that leverages how users already expect to interact with their phones—preferred apps, preferred channels and immediate attention—developers can make something different, something more engaging, something that immediately adds more value to the customer. When consumer expectations change, you’ll already be two steps ahead of everyone else.

    — Quinton Wall

  • Investing in a Mobile Device Testing Lab

    Investing in a Mobile Device Testing Lab

    It will likely come as no surprise that app downloads are on the rise, with no signs of slowing down. Today’s consumers use apps for everything from ordering food, to shopping for clothes, to managing money and more.

    In fact, according to a recent report by App Annie, consumers downloaded a total of 194 billion apps in 2018, up from 178 billion apps in 2017. 

    Yet, the same report shows that app retention rates after 90 days are low–ranging from 32% to a meager 4%.

    Reasons for app deletion vary, but far too many apps, in a burgeoning sea of apps, are either hastily and incompletely tested or aren’t even tested at all. This can lead to poor consumer experience, deleted apps and even negative feelings about a brand itself.

    Therefore, it’s critical for mobile app developers and practitioners to button up their testing practices before release. Otherwise, you run the risk that all the work you put into your app will only lead to the dreaded and overcrowded app graveyard.

    Overcoming Today’s App Testing Limitations

    The primary challenge prohibiting companies from properly testing their apps is access to real-time devices in the same instantaneous, maintainable and scalable infrastructure. The expectations around continuous testing in desktop, web and packaged applications is difficult to achieve in mobile testing without a device cloud, which delivers seamless access to real devices in an on-demand infrastructure and brings order to the chaos of managing multiple mobile devices in a test lab.

    A cloud-based mobile testing lab provides a comprehensive solution that solves issues around mobile app testing, including too many device types and operating systems to test, as well as a lack of people and time to test. It offers real-time, continuous access to real devices for all mobile testing needs, resulting in higher quality apps and increased customer satisfaction and retention.   

    An added bonus is a cloud-based mobile testing lab frees app testers from initiating and monitoring automated tests. Basically, testers can automate their automation. This, in turn, allows them to perform other significant tasks that can increase user acceptance, engagement and experience.

    Failure Looms with Little or No Testing

    That being said, some organizations, in a rush to go to market, release an app with little to no mobile testing at all. They believe testing is too difficult, too time-intensive or too costly to be worth their while. Some think minimal web testing will keep them out of trouble when it comes to mobile. And although we all like to think that we write bug-free code, unfortunately this isn’t always the case.

    Furthermore, there are those who will test their app and then release it before fixing all the bugs, thinking they can test and improve along the way. However, that way of thinking can be detrimental to a company and its brand. Localytics found technical failure as simple as an image not loading can lead to a 29% loss of customers.

    Mobile App Testing Helps Ensure a Thumbs Up 

    The average U.S. adult, according to an eMarketer study, spends 3.75 hours on mobile devices each day, with nearly three of those hours using apps. Further, Statista estimates app downloads to grow to 258.2 billion in 2022. Clearly, the app market is thriving, but so is the competition. You’ll have a better chance of standing out in the crowd if your app works–flawlessly.

    A mobile device testing lab could be one of the key solutions that will help separate the proverbial app wheat from the chaff. By testing apps in real time, you understand which types of devices are most affected should a crash occur. Analytics show what app features are used most, allowing you to prioritize what should be fixed first during the testing process. 

    The future of apps is in mobile, which is why mobile testing will continue converging with legacy applications such as web and desktop. Forward-looking companies need an approach that allows top-of-line technologies to work together as if provided by a single solution provider.

    A mobile device testing lab helps you break through the barriers of app development. In doing so, your app has a better chance of doing what you say it will do–without crashes–hopefully earning your app a coveted spot on users’ home screens instead of the trash.

    — Dan McFall

  • Progressive Web Apps are Taking Over the Mobile Web

    Progressive Web Apps are Taking Over the Mobile Web

    Consumers now spend most of their time on their mobiles, that’s no secret. And with 4G networks now the norm in both developed and developing markets, people have every reason to expect their mobile experiences will be as good as PC-based ones.

    But they aren’t for the most part. Mobile web is 49% of all online traffic, but mobile conversions remain painfully low at only 1.7%. This is a sobering statistic, particularly for companies who are under growing pressure to stay relevant as customer behavior continues to evolve.

    Part of the issue comes down to limitations in the user experience on mobile (i.e. smaller screens), but the bigger factor is speed. According to Google, 53% of users will bounce off a web page that takes more than three seconds to load. And yet, the average homepage still takes 15 seconds to load on a mobile phone.

    Unless a customer feels an extreme sense of urgency to make their purchase, it’s unlikely they will endure the pain of waiting for page after page to load as they try to get through a purchase selection and checkout process on their phone. Neither are they likely to immediately put down their phone and dig out their laptop to complete the transaction.

    Welcome to the Progressive Web

    Enter progressive web apps (PWAs), the future of mobile web experiences.

    While responsive web design (RWD) made most websites usable on a phone sized screen, the actual experience of interaction has proven too slow and clunky when compared to the same website on a PC. In response, many brands have developed their own mobile apps, hoping to win customers over with a smoother and more convenient service. However, aside from niche businesses with a high-touch, loyal customer-base, such as Starbucks and Facebook, most brands have spent a great deal of time making apps that are moderately successful at best, not to mention the hundreds of thousands, or even millions of dollars in development costs.

    PWAs represent a significant leap forward because they allow companies to deliver the user-friendliness and page load speeds of a native app, but directly from the company’s mobile website. PWAs also make it possible for developers to create online experiences that don’t just adjust to different screen sizes but can interact with device features (such as Camera, GPS and push-notifications) creating streamlined experiences that are optimized based on which device a customer is using. The result is a more consistent experience across devices, with no features lost.

    Most importantly, at a time when the war for attention has never been more intense, with PWAs, web pages load in a fraction of the time, keeping customers engaged rather than testing their patience and driving them to competitor sites.

    Take the Financial Times, a company proving PWAs can have a major impact on conversion. The FT recently went the PWA route to keep pace with surging web traffic.

    “One of our key metrics was speed. We determined if we made the site just one second faster, it increases engagement by 5%, and would ultimately add millions of dollars to our bottom line due to increased ad views,” said Cait O’Riordan, chief product and information officer at the FT.

    Analyst houses Forrester and Gartner are also bullish on PWAs. Forrester went as far as to say there is no longer a point in arguing over which kind of mobile app is best–native or hybrid–because with PWAs taking off, nobody will bother using apps soon. Even among airlines, whose apps are some of the most useful and commonly downloaded, progressive web is seen as the future.

    “Apps are a temporary necessity in the development of better mobile experiences,” admitted Scott Wilson, vice president of eCommerce merchandising at United.

    Democratizing Mobile Access

    In addition to supporting faster and more responsive mobile experiences, PWAs also make access to these experiences more democratic. This is particularly relevant in emerging markets such as India and Indonesia, where consumers have limited data allowances on their phones due to high costs.

    Until now, this has stopped customers from downloading multiple apps. It has also limited people’s ability to engage with brands because, for many, mobile is their only portal to the internet. This is all set to change with PWAs.

    PWAs demand a fraction of the data compared with traditional apps while offering nearly the same quality of experience, eliminating the access barrier and delivering a win-win for merchants and customers alike.

    Why Now?

    It’s no surprise the world’s leading brands, from BMW to Starbucks, have already deployed PWAs or are on the verge of doing so. Starbucks’s mobile app has long been viewed as a gold standard for customer experience and loyalty programs, but even the world’s biggest coffee chain understands PWAs are the way forward.

    The wider move toward progressive web will begin in earnest over the next year. More organizations have come to appreciate the revenue risk of getting left behind and have begun to prepare for a PWAs push between now and 2025. Five years from now, mobile will easily account for 60-70% of web traffic, and customers will not hesitate to funnel towards mobile sites that work quickly and reliably. As the disruption of the past decade has shown us, heritage is no guarantee of loyalty when it comes to digital experiences.

    Of course, the transition to PWAs can’t be accomplished overnight. It is a major strategic transformation that requires brands to take on a front-end rebuild of their websites. It’s also worth noting PWAs development costs can be on-par with those for a mobile app. However, unlike apps that need multiple versions for iOS and Android and require frequent updates on their respective app stores, PWAs are simply an evolution of existing open web technologies that make the web a better place both on mobile and desktop. The opportunity cost of becoming a laggard on the web is much higher than the investment cost of building a PWA.

    PWAs will soon be the foundation of all digital commerce globally, and the rollouts planned over the next few years will see leading brands set a new minimum standard for customer experience. Google already added a mobile speed score to its search result rankings algorithm in 2018, and there is widespread consensus that page load times and PWA compliance will only carry more weight in Google’s rankings as more people abandon their PCs for mobile devices.

    Customers around the world are also ready for better mobile experiences. With PWAs, brands will gain access to technology that will help them satisfy their customers’ appetite for speedy web experiences–and the race to capitalize has begun.

    — Peter Sheldon

  • The State of Low-Code Development

    The State of Low-Code Development

    As enterprises continue to play catch-up when it comes to meeting their internal demand for new software services and applications, more enterprises—but still, only a minority—are turning to low-code development platforms to try to fill the gap.

    Low-code development platform provider OutSystems released its sixth annual “State of Application Development Report.” The report is based on surveys conducted in March of 3,300 IT professionals.

    The report found that a sizable minority (41%) of respondents are already using low-code platforms, while another 10% stated they were about to start using a low-code development platform. For comparison, in the 2018 report, 34% of respondents said they were using low-code development platforms and 9% said they were about to start using these platforms. Clearly, interest in these platforms is rising, if not modestly.

    Low-code development platforms strive to make software development more accessible. They do so by removing traditional coding interfaces with graphical user interfaces. And they typically target development toward a specific functionality, whether that be web applications, business process automation, IoT and, quite often, databases. The low-code development platform market is expected to grow to $27.2 billion by 2022 from $4.3 billion in 2017, an annual growth rate of 44%.

    The demand for software has never been higher. According to the OutSystems report, 64% of IT professionals said they have an application development backlog. For 19% of respondents, that backlog is deeper than 10 apps. While 50% said their backlogs have remained the same, 39% report that their app backlogs have improved over the past year.

    The time to deliver web apps and mobile apps is mixed. The 2018 OutSystems report found that 54% of respondents took four months or less to deliver a web application. This year, 61% said it takes them four months or less to deliver a web application. Mobile app development has changed a little: 55% on average said they deliver apps in four months or less.

    According to OutSystems, enterprises using low-code development platforms are 12% more likely to report that their backlogs have improved year over year.

    Those findings echo similar surveys. For instance, a survey released earlier this month from low-code provider Appian found that nearly 80% of its respondents believe that using low-code can free developer time to work on higher-level projects. That survey also found 86% of IT developers agree that emerging technology is increasing the pressure on the IT organization.

    One thing is certain, the demand for software isn’t going to let up anytime soon. According to the OutSystems report, the number of applications respondents plan to deliver this year is 60% higher than last year. For those with more than 500 employees, 65% said they had plans to deliver 10 or more apps, 38% plan to build 25 or more apps and 15% said they plan to develop 100 or more apps this year.

    Despite the high demand for enterprise software, only 36% of organizations have larger development teams than they did a year ago. However, that’s likely not due for lack of trying to hire and retain development talent. The OutSystems survey found only 15% of respondents described developer recruitment as easy. “For many organizations, retention of developer talent appears to be an equally grave challenge,” according to the report.

    With conditions like that, it’s only reasonable to expect low-code development platform popularity to continue to rise.

    — George V. Hulme

  • Building Amazing Apps, Part 1: Optimizing the Front End

    Building Amazing Apps, Part 1: Optimizing the Front End

    There are millions of apps available today, and it’s incredibly easy for any user to download and install any of them with just a few taps on a screen or click of a mouse. If you want to build and deliver an app that will amaze users, you need to be able to differentiate from the rest of the pack.

    Over the past 14 years, I’ve been working closely with the top companies delivering the most popular apps, helping them optimize their apps for speed and scale so users get a great experience. In this three-part series, we’ll explore the fundamental steps you must take to build and deliver your own amazing app at scale that will keep users coming back for more.

    We’ll break these steps down into three key areas:

    • Front end: Covers the parts of the app that end users interact with.
    • Back end: Looks at the required origin infrastructure to support the app, including databases, application, web servers and more.
    • Middle-mile: Explores the internet, where all the information needs to traverse back and forth between the front end and back end.

    Let’s explore the front end, and the five things you need to take into consideration to build and deliver a world-class front end for an amazing app.

    Beautiful User Interface

    People love beautiful things. That’s why they enjoy looking at the orange colors of a sunset or why they pay exorbitant amounts of money for a work of art. Building an aesthetically pleasing interface must be a top priority during the design phase. The first sign of a good user experience is an attractive design, and users are more likely to spend more time with the app if it is appealing to the eye.

    So where do you start when designing your app? Begin by reviewing the most popular apps on the app stores or the ones you use and enjoy the most and write down what design characteristics you like from each one. You should also follow industry best practices for app design such as:

    • Pay attention to graphic design.
    • Ensure you use curated images that look great.
    • Pick beautiful fonts with curved edges, e.g., Open Sans.
    • Manage white space effectively to display as much information as possible without having crowded text.
    • Ensure your UI is intuitive and simple to reduce the learning curve.
    • Avoid information overload through short and clear wording.
    • Maintain consistency within all the screens in the UI.
    • Select a distraction-free UI that avoids blinking text and excessive use of colors.
    • Follow standards (follow UI designs already in place).

    Accessibility

    At a fundamental level, it is a social responsibility to ensure your application can be used by people with impaired mobility, vision, hearing, cognition or language understanding. In some context, it is also a legal requirement.

    An excellent accessibility reference for developers is the Web Content Accessibility Guidelines (WCAG), which is sponsored by the World Wide Web Consortium (W3C). This reference includes accommodations for blindness and low vision, deafness and hearing loss, limited movement, speech disabilities, photosensitivity and more. For example, you should provide text alternatives for non-text content such as an image or a graph using the alt text HTML tag that accessibility software can use to describe what the image or the graph is. This is as simple as <img src=”smiley.jpg” alt=”Smiley face“>.

    Accessibility is too often forgotten or left to the later stages of app design. However, it is much more difficult to implement accessibility functions later on than if you plan for it upfront.

    Speed and Responsiveness

    User patience is shrinking and first impressions matter, so your app needs to start as quickly as possible. But it’s often easier said than done to get everything ready for user interaction within 1 second flat as certain operations, such as sending data to a server over a slow mobile network, can take a long time.

    So, given the challenges, how can you overcome them to provide a fast experience in your app?

    Start with performance-oriented design in mind, building the app logic in a way your users will perceive it as being fast at all times. You can, for example, implement caching and store the information presented to the user in the local cache. You can then use the cache to restore the last status almost instantaneously during startup while the app opens the network connection to the server and requests the data. Another characteristic of performance-oriented design is performance budget and code optimization. Performance budget means you set a performance baseline for a specific piece of code or functionality and put tools in place to ensure that baseline is not exceeded when releasing new code. Code optimization means trying new approaches to make the code run faster.

    Do this in the following cycle: optimize -> deploy -> measure.

    Repeat this cycle several times until your performance gains start to flatline. After this point, you can apply two concepts from the psychology world to make your app “feel faster” (aka “perceived performance” and “active waiting”).

    Perceived performance refers to how users perceive whether something is slow or fast, while active waiting refers to the fact that users perceive time as passing more quickly when they are engaged while they wait. So, when there is an operation where the user has to wait, you can incorporate some movement on the screen to draw the user’s attention—or, better yet, get them to interact with the app by providing a suggestion for optimizing their usage of the app or a curated quote. The chat app Slack does this pretty well.

    Network Awareness 

    Your app should keep track of network status, monitoring the available bandwidth and identifying when the network is not available at all. With this information, the app should adapt its behavior to improve the overall user experience. For example, let’s say the user is trying to send some data to the server while the network is not available. One solution is to switch the user to an offline mode, and let the user know they are offline and that the operation they are trying to do will be processed as soon as they are back online. At the same time, you could offer a cached version of the information, so the user can partially interact with the app.

    Network monitoring in your app should be planned carefully to avoid consuming too much power, which may impact the device’s battery life. For example, when the network is already active, you could send a few bytes to measure the latency to the server. You should avoid a constant network keep-alive, as actively maintaining the network even when there is no data to send or receive may impact the device’s energy resources.

    There are also intelligent edge solutions you can apply to your app that automatically adapt the compression of images depending on the network conditions. This means that the edge server can deliver a smaller version of the image for devices that have a slow network connection, without having to implement any logic on the app.

    Security

    Security is not an option, but a requirement that you should keep top of mind while building your application. The last thing you want is a security breach that compromises your users’ data or the integrity of your servers.

    For starters, ensure all your network connections are encrypted end to end and use secure protocols such as TLS v1.2 at the minimum or v1.3, which offer better security and a faster connection establishment. Ensure that your certificate offers strong ciphers that implement “perfect forward secrecy” (which makes it more difficult to be caught by man-in-the-middle attacks) and implement login techniques within the app that verify the user through secure techniques such as two-factor-authentication.

    You can also enhance your application security by implementing security measures at the edge such as automated bot protection. In this instance, machine learning technology in your edge servers can use device sensors such as the accelerometer to differentiate a real user from a bot that has stolen credentials and is trying to perform a malicious action.

    Coming up next in this three-part series: Everything you need to know about optimizing the back end.

    — Javier Garza

  • 5 Tips for Creating Blockchain IOS and Android Apps

    5 Tips for Creating Blockchain IOS and Android Apps

    Blockchain development and blockchain technology are playing a major role in the creation of various iOS and Android apps. Blockchain technology has seized the attention of many and when it is utilized properly, mobile app developers are able to achieve results that few thought possible.

    There are no shortage of benefits provided by blockchain development. Data security levels are increased and unnecessary intermediates are removed from the process. Financial organizations have been taking an increased level of interest in blockchain technology in recent years and this creates added opportunities for app developers.

    So, how can app developers properly capitalize on the opportunities that are created by blockchain technology and blockchain development? This guide is here to help. Here are some tips and pointers that are designed to help developers create iOS and Android apps that take advantage of blockchain technology and blockchain development.

    Focus on the Interface

    Blockchain development can be used to create all sorts of valuable iOS and Android apps, but for these apps to reach their full potential, developers must remain focused on the interface. Not considering the user’s experience during the development process could lessen the level of impact of the app.

    Is the front-end programming language operational? Is the blockchain application that is necessary for operating this language included? Has the developer considered the importance of an external database? Is the right application control being included during the development process?

    These are all questions that need to be answered so the app developer can create a quality design for the user interface. Identifying the proper analytics is also crucial. Otherwise, it becomes more difficult for developers to identify the right system. Building an admin console is a key step of the process as well.

    Take a Closer Look at the Importance of Architecture

    If a blockchain app is being created to be used on an iPhone or Android device, developers must take a closer look at the design architecture so that they can avoid common mistakes. Unfortunately, many aspects aren’t always considered, and they often involve additional processes that can add extra time to the process.

    For example, those who are planning on creating a hybrid app will need to obtain certain permissions first. The more developers know about the necessary parameters that have been established, the better their chances of creating an app that will be useful to those who rely on blockchain technology daily.

    The processors, size, memory and operational systems must be configured properly, and these configurations all fall under the architectural umbrella. Great design is crucial, and app developers who aren’t willing to consider the most vital components will come up short when it comes to their design architecture.

    Proper Platform Utilization

    An app that relies on blockchain development and technology needs the proper platform to be successful. This platform should be unique yet accessible. When issues come to the forefront (and they are going to, despite your best efforts), developers’ ability to solve these problems will be determined by the chosen platform.

    For issues to be solved, a consensus must be reached, which is easier when the correct platform has been selected. Now that more platforms are openly sourced, this makes life much easier—developers have the chance to select the platform that best aligns with all of their needs and desires.

    Whether a developer decides to choose Ethereum, Quorum or a different platform entirely, it behooves them to take the time to study the advantages and disadvantages of each, especially when blockchain technology is being utilized.

    Recognizing the Importance of Consensus Mechanisms

    Is the application being decentralized? This is one of the main questions that must be answered before this process can be completed. An iOS or Android app that is reliant on blockchain needs a consensus mechanism to work in the proper manner once it has launched.

    Without decentralization and a consensus mechanism, many of the typical problems and issues that arise are not as easy to solve. The system used to connect and provide a link needs a proper consensus. Without a consensus mechanism, the system’s ability to carry out all of the necessary tasks is severely compromised.

    Apps that are related to blockchain must be developed with the right approach. Are the necessary considerations being made? Is the best method being chosen for delivering proofs? Are the basic requirements being met when these proofs are delivered? A developer looking to take advantage of the current climate needs to be able to answer all of these questions.

    Identification of Objectives

    Last but certainly not least, developers must identify their objectives. What is the goal they are trying to accomplish by creating this app? What role is blockchain technology going to play? Are all of the necessary blockchain development principles being adhered to? Is the issue that is going to be solved being made perfectly clear?

    Answering these questions in a timely manner allows a developer to decide on the correct course of action. The same rules that apply during the creation of any other app still come into play when blockchain apps are being developed for iOS and Android users. The problem that is being solved by the creation of the app must be clearly defined.

    Are the issues being caused by data loss? What resources are being provided that were not previously available? To get the most out of the development process, the issues and the associated goals must be examined closely.

    — Harnil Oza

  • Understanding the Mobile DevOps Process

    Understanding the Mobile DevOps Process

    In today’s current technology scenario, mobile app developers are always on the lookout for the latest IT innovations to stay on the competitive edge. To make the process of developing mobile apps more efficient, mobile service providers have adopted mobile DevOps.

    Mobile app development adopts the latest trends, technologies and tools for developing intuitive mobile application across different platforms as well as industry verticals. There are many mobile developers who are experts in the development of hybrid and native mobile applications across the platforms for end-to-end mobility, such as iOS, Android and Windows. Service providers aspire to achieve the business objective of the clients through leveraging people, processes and the latest technology.

    Why Mobile DevOps

    There are so many discussion and articles on mobile app development and how mobile DevOps practices could be integrated, adopted with existing processes and even how to use efficient resources that are beneficial for organizations. However, little has been said about why mobile DevOps could make a difference to companies that strive to enable their IT, development and operations to integrate with business goals.

    DevOps is vital for modern app development and delivery. However, leaders in the mobile application development and IT operations should address the unique collaboration, testing the release and analytics needs of mobile DevOps environments.

    Mobile DevOps for a Mobile Apps Developer

    The mobile DevOps discipline needs important business and technical decisions to be usable and to provide value for organizations. To get all critical pieces together and allow continuous mobile DevOps workflow, potential problems and bottlenecks should be identified. Nevertheless, mobile DevOps has its pros, as well.

    For a mobile developer to win the loyalty of mobile users, it must ship the right applications to the right customer at the right time. One has to continuously ship high-quality software and continuously listen and learn from users, providing them features before they know that they want them. Agile development methods are not enough; to win in mobile application, a developer needs mobile DevOps. It combines great automated tooling with a “continuous everything” culture.

    The Pros of Mobile DevOps

    Mobile DevOps has a number of advantage, including:

    • Shortens release time. DevOps, it’s been said, is about collaboration across teams, something that was not managed properly with the old waterfall practices. Actually, mobile DevOps is more than that. The simplified processes, when operations and development come together, could enable organizations share information between the teams and others and considerably shorten the time from the design-development phase to the actual release. Iterative cycle during development enable more frequent deployment of code, get new regressions tested, verified and released faster than regular phase-by-phase process. Mobile DevOps offer a faster path of fixing occurring problems with the product. Once enhancements and features implemented for each build are done, continuous integration with the right test setup provide a faster solution to problems.
    • Enables creation of better applications. More time spent on making new features, advantages and benefits for users simply are enabling the creation of better user experiences. User experience is the true differentiator today in the competition of the mobile apps popularity. Only those that enable delivery of experiences that users expect could remain in the competition. One of the most important things in doing DevOps is enabling instant feedback and reporting, transparent visibility to development and regression testing is paramount. This provides the mobile team an easy way of troubleshooting issues faster and fix, refactor and optimize user experience.
    • Saves time and make use of efficient resources. Faster features delivery, new build and updates are achieved when operation environments such as development, staging and production are stable and the operating environments work easily for development. This itself makes the whole mobile app development process more productive and helps maximize business advantages. One enabler of mobile DevOps is automation. Automation is available from source code management to testing and development tools and further to actual mobile app monitoring in production.
    • Provides multiple tools options. There are hundreds of thousands of tools that mobile applications are developed with daily. For any kind of feature, there should be a tool that could help build, test and deploy a certain part or feature of the app. Nonetheless, for good reason, some tools are used commonly by the mainstream. Most of the tools used and mobile DevOps processes that establish mobile DevOps core facilitate continuous integration, continuous release as well as continuous deployment. Part of the process is app release automation tools, which help up packaging and deploying app from development to production using automation. These tools help mobile DevOps flow to produce capabilities for implementing continuous delivery for even huge number of releases. Release management tools enable organizations to plan and to execute releases, offer a single collaboration portal for all stakeholders and provide traceability for a release and its components across all the build and delivery pipeline stages.
    • Could dodge inefficiencies and bottlenecks. The major idea behind Mobile DevOps is to make things transparent and efficient, boost internal communication and help in building better products or applications. When mobile DevOps practices, processes and tools are in line, several bottlenecks and inefficiencies could be avoided, such as:
      • Inconsistent development environments
      • Stability and maturity of workflow
      • Manual interventions
      • Lack of operational practices
      • ‘Old way’ and ‘new way’ integration
      • Competing/misaligned procedures and lack of ownership
      • Old-fashioned or manual testing process.

    Mobile DevOps is capable of transforming how an organization handles the development process for the better. It is no wonder  it has become the way of the future for mobile organizations. The DevOps approach principle puts emphasis on people and culture above tools and processes; thus, bringing business owners intimately to the design process can boost the success of the process. Organizations have to embrace a combination of collaboration and integration tools from both parties. Seamless interaction unlocks full benefits of the method and could ultimately contribute to overall business and operational success.

    About the Author / Drumit Shukla

    Dhrumit Shukla has been working as Business Development Manager in a software development company named TatvaSoft since 5 years. He is profoundly skilled and well experienced in providing software development services on various technologies ranging from Microsoft .NET to JAVA, Salesforce, BizTalk, SharePoint, PHP, Open Source, iOS, Android, Pentaho and more. Connect with him on LinkedIn.

  • Tips for Creating Unit Tests for Mobile Apps

    Tips for Creating Unit Tests for Mobile Apps

    Mobile app testing ensures your application is working perfectly without any freezes, bugs or crashes. There are unit, auto, system and acceptance tests, and in this article we will talk about unit testing for mobile apps.

    First, let’s discuss what unit tests are in general. Unit testing checks whether certain parts of the code work correctly. In other words, it helps us produce more robust and maintainable code. Each one small test is dedicated to a small feature. All of them are connected, however, so you get a kind of chain. If any part of this chain fail, the whole chain will fail as well.

    As a part of mobile application testing unit tests may be written at any phase of development or even before development (test-driven development, or TDD, is one of the iOS unit testing best practices). With this kind of development, you let your tests drive the development process. They indicate what you do, what you should do next and what the result should be. Testing controls the design.

    Thus, unit testing is the first step to perfectly working code. But it also is the primary means for your software quality assurance. In this article we’ll explain how to do mobile apps unit testing on an iOS example and give you a small iOS unit testing tutorial.

    Do I Need to Conduct Unit Testing?

    Does everyone need to do unit testing? The short answer is no. The long answer is that it  is a very good tool, though it isn’t necessary in all situations.

    You don’t need unit testing if:

    1. your app is very small and simple. If your app is small, it will be faster to check everything manually because there’s not that much logic to be checked.
    2. you don’t plan your app to work in the long term and you need it only for a demonstration.
    3. you’re a super-human who writes perfect code without any mistakes.

    If you don’t fall into any of these categories, then unit testing is what you need. At first, this kind of testing may seem too time-consuming. Lack of time is mentioned as one of the most serious problems related to testing, but actually performing unit testing can save a lot of time and improve development speed. In addition, it can serve as a kind of documentation for your library. We at Mobindustry spend up to 30 percent of our development time on testing.

    Unit tests have two main purposes:

    1. Reduce the number of bugs by making sure that our class/module/component is working as expected with all possible inputs.
    2. Reduce the number of regressions by making sure that our new functionality, bug fixes or refactoring hasn’t broken any existing functionality.

    How Do Unit Tests Work?

    How to create iOS unit testing? Xcode has built-in support for unit tests and works as an iOS unit test framework. You can use Xcode by pressing cmd+U or via the menu by selecting Product -&gt; Test. xCode will run all active tests and generate a report with results (passed/failed). All failed assertions are indicated. Code coverage data is also generated in this framework, which allows you to get to any class and check which lines of code were called and how many times they were called.

    Types of Unit Tests

    Unit test for iOS can either check the UI or the logic of the application. Logic ones have a few subtypes:

    • Regular ones are used to check straightforward functionality.

    func testExample() {

    let account = Account()

    account.amount = 100.0

     

    account.withdraw(20.0)

     

    XCTAssert(account.amount == 80.0, &quot;Account should have current amount of 80.0 but has

    (account.amount)&quot;)

    }

    This is used to simply check if the withdraw() method is working correctly.

    • Asynchronous tests use XCTestExpectation to check for expected outcomes.

    func testExample() {

    let url = URL(string: &quot;http://www.google.com&quot;)

    let expectation = XCTestExpectation(description: &quot;expectation_description&quot;)

     

    let task = URLSession.shared.dataTask(with: url) { (data, response, error) in

    if let error = error {

    XCTFail(&quot;Error: (error.localizedDescription)&quot;)

    return

    } else if let statusCode = (response as? HTTPURLResponse)?.statusCode {

    if statusCode == 200 {

    expectation.fulfill()

    } else {

     

    XCTFail(&quot;Request failed with status code (statusCode)&quot;)

    expectation.fulfill()

    }

    }

    }

    task.resume()

     

    waitForExpectations(timeout: 10) { (error) in

    XCTFail(&quot;Expectation (expectation.description) has failed&quot;)

    }

    }

     

    This one will check if Google’s website is available (i.e. if it returns status code 200).

    XCTestExpactation is used to wait for the async task to finish. An Expectation will either finish successfully by calling the fulfill() method or will fail if the timeout time has passed but fulfill() hasn’t been called.

    • Measure ones check heavy logic:

     

    func testExample() {

    self.measure {

    let lotOfObjects = []

    for obj in lotOfObjects {

    obj.makeCalculations()

    }

    }

    }

     

    You can create this test to measure how much time and how many resources are spent on particular calculations inside the measure() block.

    Tips on Unit Testing for Mobile Apps

    • Remember the structure

    The common AAA approach to structuring is the most common and convenient way to write tests. AAA stands for:

    1. Arrange – the part that allocates all necessary objects and sets up initial parameters
    2. Act – the part that executes the logic
    3. Assert – the part that checks if the obtained results match the expected results

    Сode written this way is easy to read and use, which means it’s easier to maintain.

    • Cover only necessary things with tests

    Some people think it’s necessary to cover every single part of your code with a unit test. This approach is actually time-consuming, complex and completely useless.

    There are four types of code you may have in your project. Let’s look at them starting with the most extreme options:

    1. Simple code without any dependencies: Probably everything is already clear with this kind of code and there’s no point in assessing it.
    2. Complex code with lots of dependencies: If you have this kind of code, it’s a good idea to refactor. There’s no need to cover this code because we’ll rewrite it, which means new classes will appear and method signatures will change. Why write something that won’t be used? Of course, such code also needs quality assessment, only on a higher level.
    3. Complex code without dependencies: This code contains algorithms or business logic. This is the perfect kind of code for testing because these are very important parts of the system.
    4. Moderately complex code with dependencies: Such code links different components together. Tests are very important here; they tell how exactly components must interact.

    Usually, they cover the following areas of code:

    • Common functionality, core models, classes and their interaction
    • Main UI workflows
    • Crucial logic
    • Bug fixes

    Unit tests may be applied not only for these areas. They can actually be used for testing almost any functionality.

    Don’t cover trivial functions and system functions.

    • Test only one thing at a time

    The idea is to divide your application into different independent modules that are able to work by themselves without interacting with other parts of the application. This allows you to work on each module separately and simplify the code. If you check several things at the same time, sooner or later your code will become overloaded and too complex. It will become difficult to support it and use.

    • Name your tests logically

    It’s very important to name your tests properly and assign them to the correct parts of your project. Many projects have tests that no one is running because of inconvenient placement and naming. Here are some tips for logical structure:

    1. Choose a logical location in your version control system: They have to be part of your version control. Depending on your needs they can be organized differently, but here’s a common recommendation—if your app is monolithic, put all of them in a Tests folder; if it has many components, store relevant tests in each component’s folder.
    1. Choose a convention for naming: One of the best ways to do this is to add a test project to each project you build.
    1. Use the same convention for naming test classes that you use for naming project classes: If you have a class ProblemResolver, it’s a good idea to add a class called ProblemResolverTests. Each class should work only on one thing; otherwise, your tests will be very hard to manage.
    • Work with mocking objects

    You can use different fake objects to make the testing process easier. There’s no need to allocate and manage a huge class or component just to use a single method from it. Such fake objects can be divided into two groups:

    • Stubs
    • Mocks

    Stubs are fake methods for returning a predetermined response. The main use for stubs is when interacting with an API. The idea is not to wait for the actual connection to finish but to return predefined data or a predefined error instantly.

    Let’s assume we have an app where you can add a friend connection. There’s a FriendListViewController that displays a list of all your friends. This friend list can be downloaded from the backend, so there’s an ApiManager class with a method like this:

    ApiManager.shared.getListOfFriends(withCompletion: { (friends) in

    let friendsListVC = FriendListViewController.init(friends: friends)

     

    //Present friendsListVC

    }) { (error) in

    //Display error

     

    }

    This method has a completion handler, and we need to wait till it finishes.

    But we actually don’t need to wait because we don’t need any APIs or even an internet connection. We need to make sure FriendListViewController is working correctly, and all we need for that is some list of friends; it doesn’t matter where they come from. So we’ll introduce an ApiManagerStubs class that will duplicate methods from the actual ApiManager but will not perform any actual API requests.

    For this particular test, we’ll write a method for getting a list of friends:

    func getListOfFriends() -&gt; [Friend] {

    let friend1 = Friend.init(name: &quot;Bob&quot;, surname: &quot;Barker&quot;, age:34);

    let friend2 = Friend.init(name: &quot;John&quot;, surname: &quot;Doe&quot;, age:30);

     

    return [friend1, friend2];

    }

    After that we can easily allocate and test FriendListViewController.

    func testExample() {

    let friends = ApiManagerStubs.shared..getListOfFriends()

     

    let friendsListVC = FriendListViewController.init(friends: friends)

     

    //Testing friendsListVC.tableView

    }

    Mocks are fake objects that partially duplicate real objects, allowing you to check if a method was called or a property was set after certain events.

    In the example above, when a friend is deleted we need to clear the chat history for this friend. We have some class like ChatManager for this functionality. But again, for this, we don’t need to actually delete any data or call any APIs; we just need to check if the corresponding callbacks are triggered. So we’ll introduce the mock object ChatManagerMock, which behaves like ChatManager, only instead of deleting data it just remembers which callbacks were triggered.

    class ChatsManagerMock {

    var deleteFriendWasCalled = false

     

    func clearChatHistoryForFriend(_ friend: Friend) {

    deleteFriendWasCalled = true

    }

    }

    Now we can implement our test as follows:

    func testExample() {

    let friends = ApiManagerStubs.shared.getListOfFriends()

     

    let friendsListVC = FriendListViewController.init(friends: friends)

     

    let mock = ChatsManagerMock()

    friendsListVC.chatsManager = mock

     

    //Trigger Delete action for first friend in the list

    friendsListVC.deleteFriendButtonAction(nil, index: 0)

     

    XCTAssert(mock.deleteFriendWasCalled, &quot;deleteFriendWasCalled should have been called&quot;)

    }

    Conclusion

    Unit tests are a very powerful tool to help developers avoid bugs and spot them quickly when they do appear. They help you maintain your code, but at the same time they need maintenance as well. The big problem of many projects is tests that no one uses, and to avoid it you need to stick to some rules. Your tests must:

    • be reliable;
    • not depend on the environment they’re run in;
    • be easy to maintain;
    • be easy to read and understand (even a beginner QA has to be able to understand what’s going on);
    • have a standard naming convention; and
    • be launched regularly and be automated.

    Following these basic rules will help you get a working system. Each test will check only one thing. Your tests will be specifications for class method; it will tell all about what input they expect and what other system components expect as the output. There are very few systems like this. Such systems have an actual specification, and there’s usually not very much text in it—only basic features, server schemes and a “getting started” guideline. The life of such projects no longer depends on people; developers may come and go while the system is reliably tested and tells all about itself with the help of its own tests.

    About the Author / Svetlana Cherednichenko

    Svetlana Cherednichenko is a content writer. Currently she is a part of Mobindustry marketing team. She is an active member of the debate movement and she is a winner of two regional tournaments. Now she is in the process of improving her skills in graphic design and learning new frameworks. She graduated from the Dnipropetrovsk National University. Svetlana likes to travel, read about tech news and play video games. Connect with her on LinkedIn.