How To Improve Test Coverage For Your Android App Using Mockito And Espresso How To Improve Test Coverage For Your Android App Using Mockito And EspressoVivek Maskara2018-07-25T14:00:04+02:002018-07-25T17:27:43+00:00 In app development, a variety of use cases and interactions come up as one iterates the code. The app might need to fetch data from a server, interact with the device’s sensors, access local storage or render complex user interfaces. The important thing to consider while writing tests is the units of responsibility that emerge as you design the new feature. The unit test should cover all possible interactions with the unit, including standard interactions and exceptional scenarios. In this article, we will cover the fundamentals of testing and frameworks such as Mockito and Espresso, which developers can use to write unit tests. I will also briefly discuss how to write testable code. I’ll also explain how to get started with local and instrumented tests in Android. Recommended reading: How To Set Up An Automated Testing System Using Android Phones (A Case Study) Fundamentals Of TestingA typical unit test contains three phases.
If the observed behavior is consistent with the expectations, the unit test passes; otherwise, it fails, indicating that there is a problem somewhere in the system under test. These three unit test phases are also known as arrange, act and assert, or simply AAA. The app should ideally include three categories of tests: small, medium and large.
Note: An instrumentation test is a type of integration test. These are tests that run on an Android device or emulator. These tests have access to instrumentation information, such as the context of the app under test. Use this approach to run unit tests that have Android dependencies that mock objects cannot easily satisfy. Nope, we can’t do any magic tricks, but we have articles, books and webinars featuring techniques we all can use to improve our work. Smashing Members get a seasoned selection of magic front-end tricks — e.g. live designing sessions and perf audits, too. Just sayin’! Writing small tests allows you to address failures quickly, but it’s difficult to gain confidence that a passing test will allow your app to work. It’s important to have tests from all categories in the app, although the proportion of each category can vary from app to app. A good unit test should be easy to write, readable, reliable and fast. Here’s a brief introduction to Mockito and Espresso, which make testing Android apps easier. MockitoThere are various mocking frameworks, but the most popular of them all is Mockito:
Its fluent API separates pre-test preparation from post-test validation. Should the test fail, Mockito makes it clear to see where our expectations differ from reality! The library has everything you need to write complete tests. EspressoEspresso helps you write concise, beautiful and reliable Android UI tests. The code snippet below shows an example of an Espresso test. We will take up the same example later in this tutorial when we talk in detail about instrumentation tests.
Espresso tests state expectations, interactions and assertions clearly, without the distraction of boilerplate content, custom infrastructure or messy implementation details getting in the way. Whenever your test invokes
These checks ensure that the test results are reliable. Writing Testable CodeUnit testing Android apps is difficult and sometimes impossible. A good design, and only a good design, can make unit testing easier. Here are some of the concepts that are important for writing testable code. Avoid Mixing Object Graph Construction With Application LogicIn a test, you want to instantiate the class under test and apply some stimulus to the class and assert that the expected behavior was observed. Make sure that the class under test doesn’t instantiate other objects and that those objects do not instantiate more objects and so on. In order to have a testable code base, your application should have two kinds of classes:
Constructors Should Not Do Any WorkThe most common operation you will do in tests is the instantiation of object graphs. So, make it easy on yourself, and make the constructors do no work other than assigning all of the dependencies into the fields. Doing work in the constructor not only will affect the direct tests of the class, but will also affect related tests that try to instantiate your class indirectly. Avoid Static Methods Wherever PossibleThe key to testing is the presence of places where you can divert the normal execution flow. Seams are needed so that you can isolate the unit of test. If you build an application with nothing but static methods, you will have a procedural application. How much a static method will hurt from a testing point of view depends on where it is in your application call graph. A leaf method such as Avoid Mixing Of ConcernsA class should be responsible for dealing with just one entity. Inside a class, a method should be responsible for doing just one thing. For example,
In the next few sections, we will be using examples from a really simple application that I built for this tutorial. The app has an Writing Local Unit TestsUnit tests can be run locally on your development machine without a device or an emulator. This testing approach is efficient because it avoids the overhead of having to load the target app and unit test code onto a physical device or emulator every time your test is run. In addition to Mockito, you will also need to configure the testing dependencies for your project to use the standard APIs provided by the JUnit 4 framework. Setting Up The Development EnvironmentStart by adding a dependency on JUnit4 in your project. The dependency is of the type
We will also need the Mockito library to make interaction with Android dependencies easier.
Make sure to sync the project after adding the dependency. Android Studio should have created the folder structure for unit tests by default. If not, make sure the following directory structure exists:
Creating Your First Unit TestSuppose you want to test the
We will start by creating a
Similarly, you’ll need to mock all dependencies required to construct the instance of the
Here’s how it can be done:
Now you are done setting up your test class. Let’s add a test to this class that verifies the functionality of the
The test uses a
Running Your Unit TestsIn order to run the unit tests, you need to make sure that Gradle is synchronized. In order to run a test, click on the green play icon in the IDE. making sure that Gradle is synchronized When the unit tests are run, successfully or otherwise, you should see this in the “Run” menu at the bottom of the screen: You are done with your first unit test! Writing Instrumentation TestsInstrumentation tests are most suited for checking values of UI components when an activity is run. For instance, in the example above, we want to make sure that the Setting Up The Development EnvironmentAdd a dependency on Espresso:
Instrumentation tests are created in an
If you want to test a simple activity, create your test class in the same package as your activity. Creating Your First Instrumentation TestLet’s start by creating a simple activity that takes a name as input and, on the click of a button, displays the user name. The code for the activity above is quite simple:
To create a test for the
Next, add an
Now that you are done setting up the test class, let’s add a test that verifies that the user name is displayed by clicking the “Set User Name” button.
The test above is quite simple to follow. It first simulates some text being typed in the The final test class looks like this:
Running Your Instrumentation TestsJust like for unit tests, click on the green play button in the IDE to run the test. Upon a click of the play button, the test version of the app will be installed on the emulator or device, and the test will run automatically on it. Intrumentation Testing Using Dagger, Mockito, And EspressoEspresso is one of the most popular UI testing frameworks, with good documentation and community support. Mockito ensures that objects perform the actions that are expected of them. Mockito also works well with dependency-injection libraries such as Dagger. Mocking the dependencies allows us to test a scenario in isolation.
With Dagger in the picture, we will have to set up a few things before we write instrumentation tests. Setting Up Dagger In The ApplicationWe will quickly set up the basic modules and components required for Dagger. If you are not
Create a component in the
The
The
Create a method that returns the already built component, and then inject this component into
Setting Up Dagger In The Test ApplicationIn order to mock responses from the server, we need to create a new
As you can see in the example above, we’ve used Mockito to mock
Next, you need to update the
Running The TestAll tests with the new
The test will run successfully when you click on the green play button in the IDE. That’s it! You have successfully set up Dagger and run tests using Espresso and Mockito. ConclusionWe’ve highlighted that the most important aspect of improving code coverage is to write testable code. Frameworks such as Espresso and Mockito provide easy-to-use APIs that make writing tests for various scenarios easier. Tests should be run in isolation, and mocking the dependencies gives us an opportunity to ensure that objects perform the actions that are expected of them. A variety of Android testing tools are available, and, as the ecosystem matures, the process of setting up a testable environment and writing tests will become easier. Writing unit tests requires some discipline, concentration and extra effort. By creating and running unit tests against your code, you can easily verify that the logic of individual units is correct. Running unit tests after every build helps you to quickly catch and fix software regressions introduced by code changes to your app. Google’s testing blog discusses the advantages of unit testing.
(da, lf, ra, al, il)
source https://www.smashingmagazine.com/2018/07/improving-test-coverage-android-app-mockito-espresso/ via DerekPackard.com https://derekpackard.com/how-to-improve-test-coverage-for-your-android-app-using-mockito-and-espresso-3/
0 Comments
How To Improve Test Coverage For Your Android App Using Mockito And Espresso How To Improve Test Coverage For Your Android App Using Mockito And EspressoVivek Maskara2018-07-25T14:00:04+02:002018-07-25T12:06:31+00:00 In app development, a variety of use cases and interactions come up as one iterates the code. The app might need to fetch data from a server, interact with the device’s sensors, access local storage or render complex user interfaces. The important thing to consider while writing tests is the units of responsibility that emerge as you design the new feature. The unit test should cover all possible interactions with the unit, including standard interactions and exceptional scenarios. In this article, we will cover the fundamentals of testing and frameworks such as Mockito and Espresso, which developers can use to write unit tests. I will also briefly discuss how to write testable code. I’ll also explain how to get started with local and instrumented tests in Android. Recommended reading: How To Set Up An Automated Testing System Using Android Phones (A Case Study) Fundamentals Of TestingA typical unit test contains three phases.
If the observed behavior is consistent with the expectations, the unit test passes; otherwise, it fails, indicating that there is a problem somewhere in the system under test. These three unit test phases are also known as arrange, act and assert, or simply AAA. The app should ideally include three categories of tests: small, medium and large.
Note: An instrumentation test is a type of integration test. These are tests that run on an Android device or emulator. These tests have access to instrumentation information, such as the context of the app under test. Use this approach to run unit tests that have Android dependencies that mock objects cannot easily satisfy. Nope, we can’t do any magic tricks, but we have articles, books and webinars featuring techniques we all can use to improve our work. Smashing Members get a seasoned selection of magic front-end tricks — e.g. live designing sessions and perf audits, too. Just sayin’! Writing small tests allows you to address failures quickly, but it’s difficult to gain confidence that a passing test will allow your app to work. It’s important to have tests from all categories in the app, although the proportion of each category can vary from app to app. A good unit test should be easy to write, readable, reliable and fast. Here’s a brief introduction to Mockito and Espresso, which make testing Android apps easier. MockitoThere are various mocking frameworks, but the most popular of them all is Mockito:
Its fluent API separates pre-test preparation from post-test validation. Should the test fail, Mockito makes it clear to see where our expectations differ from reality! The library has everything you need to write complete tests. EspressoEspresso helps you write concise, beautiful and reliable Android UI tests. The code snippet below shows an example of an Espresso test. We will take up the same example later in this tutorial when we talk in detail about instrumentation tests.
Espresso tests state expectations, interactions and assertions clearly, without the distraction of boilerplate content, custom infrastructure or messy implementation details getting in the way. Whenever your test invokes
These checks ensure that the test results are reliable. Writing Testable CodeUnit testing Android apps is difficult and sometimes impossible. A good design, and only a good design, can make unit testing easier. Here are some of the concepts that are important for writing testable code. Avoid Mixing Object Graph Construction With Application LogicIn a test, you want to instantiate the class under test and apply some stimulus to the class and assert that the expected behavior was observed. Make sure that the class under test doesn’t instantiate other objects and that those objects do not instantiate more objects and so on. In order to have a testable code base, your application should have two kinds of classes:
Constructors Should Not Do Any WorkThe most common operation you will do in tests is the instantiation of object graphs. So, make it easy on yourself, and make the constructors do no work other than assigning all of the dependencies into the fields. Doing work in the constructor not only will affect the direct tests of the class, but will also affect related tests that try to instantiate your class indirectly. Avoid Static Methods Wherever PossibleThe key to testing is the presence of places where you can divert the normal execution flow. Seams are needed so that you can isolate the unit of test. If you build an application with nothing but static methods, you will have a procedural application. How much a static method will hurt from a testing point of view depends on where it is in your application call graph. A leaf method such as Avoid Mixing Of ConcernsA class should be responsible for dealing with just one entity. Inside a class, a method should be responsible for doing just one thing. For example,
In the next few sections, we will be using examples from a really simple application that I built for this tutorial. The app has an Writing Local Unit TestsUnit tests can be run locally on your development machine without a device or an emulator. This testing approach is efficient because it avoids the overhead of having to load the target app and unit test code onto a physical device or emulator every time your test is run. In addition to Mockito, you will also need to configure the testing dependencies for your project to use the standard APIs provided by the JUnit 4 framework. Setting Up The Development EnvironmentStart by adding a dependency on JUnit4 in your project. The dependency is of the type
We will also need the Mockito library to make interaction with Android dependencies easier.
Make sure to sync the project after adding the dependency. Android Studio should have created the folder structure for unit tests by default. If not, make sure the following directory structure exists:
Creating Your First Unit TestSuppose you want to test the
We will start by creating a
Similarly, you’ll need to mock all dependencies required to construct the instance of the
Here’s how it can be done:
Now you are done setting up your test class. Let’s add a test to this class that verifies the functionality of the
The test uses a
Running Your Unit TestsIn order to run the unit tests, you need to make sure that Gradle is synchronized. In order to run a test, click on the green play icon in the IDE. making sure that Gradle is synchronized When the unit tests are run, successfully or otherwise, you should see this in the “Run” menu at the bottom of the screen: You are done with your first unit test! Writing Instrumentation TestsInstrumentation tests are most suited for checking values of UI components when an activity is run. For instance, in the example above, we want to make sure that the Setting Up The Development EnvironmentAdd a dependency on Espresso:
Instrumentation tests are created in an
If you want to test a simple activity, create your test class in the same package as your activity. Creating Your First Instrumentation TestLet’s start by creating a simple activity that takes a name as input and, on the click of a button, displays the user name. The code for the activity above is quite simple:
To create a test for the
Next, add an
Now that you are done setting up the test class, let’s add a test that verifies that the user name is displayed by clicking the “Set User Name” button.
The test above is quite simple to follow. It first simulates some text being typed in the The final test class looks like this:
Running Your Instrumentation TestsJust like for unit tests, click on the green play button in the IDE to run the test. Upon a click of the play button, the test version of the app will be installed on the emulator or device, and the test will run automatically on it. Intrumentation Testing Using Dagger, Mockito, And EspressoEspresso is one of the most popular UI testing frameworks, with good documentation and community support. Mockito ensures that objects perform the actions that are expected of them. Mockito also works well with dependency-injection libraries such as Dagger. Mocking the dependencies allows us to test a scenario in isolation.
With Dagger in the picture, we will have to set up a few things before we write instrumentation tests. Setting Up Dagger In The ApplicationWe will quickly set up the basic modules and components required for Dagger. If you are not
Create a component in the
The
The
Create a method that returns the already built component, and then inject this component into
Setting Up Dagger In The Test ApplicationIn order to mock responses from the server, we need to create a new
As you can see in the example above, we’ve used Mockito to mock
Next, you need to update the
Running The TestAll tests with the new
The test will run successfully when you click on the green play button in the IDE. That’s it! You have successfully set up Dagger and run tests using Espresso and Mockito. ConclusionWe’ve highlighted that the most important aspect of improving code coverage is to write testable code. Frameworks such as Espresso and Mockito provide easy-to-use APIs that make writing tests for various scenarios easier. Tests should be run in isolation, and mocking the dependencies gives us an opportunity to ensure that objects perform the actions that are expected of them. A variety of Android testing tools are available, and, as the ecosystem matures, the process of setting up a testable environment and writing tests will become easier. Writing unit tests requires some discipline, concentration and extra effort. By creating and running unit tests against your code, you can easily verify that the logic of individual units is correct. Running unit tests after every build helps you to quickly catch and fix software regressions introduced by code changes to your app. Google’s testing blog discusses the advantages of unit testing.
(da, lf, ra, al, il)
source https://www.smashingmagazine.com/2018/07/improving-test-coverage-android-app-mockito-espresso/ via DerekPackard.com https://derekpackard.com/how-to-improve-test-coverage-for-your-android-app-using-mockito-and-espresso-2/ How To Improve Test Coverage For Your Android App Using Mockito And Espresso How To Improve Test Coverage For Your Android App Using Mockito And EspressoVivek Maskara2018-07-25T14:00:04+02:002018-07-25T12:06:31+00:00 In app development, a variety of use cases and interactions come up as one iterates the code. The app might need to fetch data from a server, interact with the device’s sensors, access local storage or render complex user interfaces. The important thing to consider while writing tests is the units of responsibility that emerge as you design the new feature. The unit test should cover all possible interactions with the unit, including standard interactions and exceptional scenarios. In this article, we will cover the fundamentals of testing and frameworks such as Mockito and Espresso, which developers can use to write unit tests. I will also briefly discuss how to write testable code. I’ll also explain how to get started with local and instrumented tests in Android. Recommended reading: How To Set Up An Automated Testing System Using Android Phones (A Case Study) Fundamentals Of TestingA typical unit test contains three phases.
If the observed behavior is consistent with the expectations, the unit test passes; otherwise, it fails, indicating that there is a problem somewhere in the system under test. These three unit test phases are also known as arrange, act and assert, or simply AAA. The app should ideally include three categories of tests: small, medium and large.
Note: An instrumentation test is a type of integration test. These are tests that run on an Android device or emulator. These tests have access to instrumentation information, such as the context of the app under test. Use this approach to run unit tests that have Android dependencies that mock objects cannot easily satisfy. Nope, we can’t do any magic tricks, but we have articles, books and webinars featuring techniques we all can use to improve our work. Smashing Members get a seasoned selection of magic front-end tricks — e.g. live designing sessions and perf audits, too. Just sayin’! Writing small tests allows you to address failures quickly, but it’s difficult to gain confidence that a passing test will allow your app to work. It’s important to have tests from all categories in the app, although the proportion of each category can vary from app to app. A good unit test should be easy to write, readable, reliable and fast. Here’s a brief introduction to Mockito and Espresso, which make testing Android apps easier. MockitoThere are various mocking frameworks, but the most popular of them all is Mockito:
Its fluent API separates pre-test preparation from post-test validation. Should the test fail, Mockito makes it clear to see where our expectations differ from reality! The library has everything you need to write complete tests. EspressoEspresso helps you write concise, beautiful and reliable Android UI tests. The code snippet below shows an example of an Espresso test. We will take up the same example later in this tutorial when we talk in detail about instrumentation tests.
Espresso tests state expectations, interactions and assertions clearly, without the distraction of boilerplate content, custom infrastructure or messy implementation details getting in the way. Whenever your test invokes
These checks ensure that the test results are reliable. Writing Testable CodeUnit testing Android apps is difficult and sometimes impossible. A good design, and only a good design, can make unit testing easier. Here are some of the concepts that are important for writing testable code. Avoid Mixing Object Graph Construction With Application LogicIn a test, you want to instantiate the class under test and apply some stimulus to the class and assert that the expected behavior was observed. Make sure that the class under test doesn’t instantiate other objects and that those objects do not instantiate more objects and so on. In order to have a testable code base, your application should have two kinds of classes:
Constructors Should Not Do Any WorkThe most common operation you will do in tests is the instantiation of object graphs. So, make it easy on yourself, and make the constructors do no work other than assigning all of the dependencies into the fields. Doing work in the constructor not only will affect the direct tests of the class, but will also affect related tests that try to instantiate your class indirectly. Avoid Static Methods Wherever PossibleThe key to testing is the presence of places where you can divert the normal execution flow. Seams are needed so that you can isolate the unit of test. If you build an application with nothing but static methods, you will have a procedural application. How much a static method will hurt from a testing point of view depends on where it is in your application call graph. A leaf method such as Avoid Mixing Of ConcernsA class should be responsible for dealing with just one entity. Inside a class, a method should be responsible for doing just one thing. For example,
In the next few sections, we will be using examples from a really simple application that I built for this tutorial. The app has an Writing Local Unit TestsUnit tests can be run locally on your development machine without a device or an emulator. This testing approach is efficient because it avoids the overhead of having to load the target app and unit test code onto a physical device or emulator every time your test is run. In addition to Mockito, you will also need to configure the testing dependencies for your project to use the standard APIs provided by the JUnit 4 framework. Setting Up The Development EnvironmentStart by adding a dependency on JUnit4 in your project. The dependency is of the type
We will also need the Mockito library to make interaction with Android dependencies easier.
Make sure to sync the project after adding the dependency. Android Studio should have created the folder structure for unit tests by default. If not, make sure the following directory structure exists:
Creating Your First Unit TestSuppose you want to test the
We will start by creating a
Similarly, you’ll need to mock all dependencies required to construct the instance of the
Here’s how it can be done:
Now you are done setting up your test class. Let’s add a test to this class that verifies the functionality of the
The test uses a
Running Your Unit TestsIn order to run the unit tests, you need to make sure that Gradle is synchronized. In order to run a test, click on the green play icon in the IDE. making sure that Gradle is synchronized When the unit tests are run, successfully or otherwise, you should see this in the “Run” menu at the bottom of the screen: You are done with your first unit test! Writing Instrumentation TestsInstrumentation tests are most suited for checking values of UI components when an activity is run. For instance, in the example above, we want to make sure that the Setting Up The Development EnvironmentAdd a dependency on Espresso:
Instrumentation tests are created in an
If you want to test a simple activity, create your test class in the same package as your activity. Creating Your First Instrumentation TestLet’s start by creating a simple activity that takes a name as input and, on the click of a button, displays the user name. The code for the activity above is quite simple:
To create a test for the
Next, add an
Now that you are done setting up the test class, let’s add a test that verifies that the user name is displayed by clicking the “Set User Name” button.
The test above is quite simple to follow. It first simulates some text being typed in the The final test class looks like this:
Running Your Instrumentation TestsJust like for unit tests, click on the green play button in the IDE to run the test. Upon a click of the play button, the test version of the app will be installed on the emulator or device, and the test will run automatically on it. Intrumentation Testing Using Dagger, Mockito, And EspressoEspresso is one of the most popular UI testing frameworks, with good documentation and community support. Mockito ensures that objects perform the actions that are expected of them. Mockito also works well with dependency-injection libraries such as Dagger. Mocking the dependencies allows us to test a scenario in isolation.
With Dagger in the picture, we will have to set up a few things before we write instrumentation tests. Setting Up Dagger In The ApplicationWe will quickly set up the basic modules and components required for Dagger. If you are not
Create a component in the
The
The
Create a method that returns the already built component, and then inject this component into
Setting Up Dagger In The Test ApplicationIn order to mock responses from the server, we need to create a new
As you can see in the example above, we’ve used Mockito to mock
Next, you need to update the
Running The TestAll tests with the new
The test will run successfully when you click on the green play button in the IDE. That’s it! You have successfully set up Dagger and run tests using Espresso and Mockito. ConclusionWe’ve highlighted that the most important aspect of improving code coverage is to write testable code. Frameworks such as Espresso and Mockito provide easy-to-use APIs that make writing tests for various scenarios easier. Tests should be run in isolation, and mocking the dependencies gives us an opportunity to ensure that objects perform the actions that are expected of them. A variety of Android testing tools are available, and, as the ecosystem matures, the process of setting up a testable environment and writing tests will become easier. Writing unit tests requires some discipline, concentration and extra effort. By creating and running unit tests against your code, you can easily verify that the logic of individual units is correct. Running unit tests after every build helps you to quickly catch and fix software regressions introduced by code changes to your app. Google’s testing blog discusses the advantages of unit testing.
(da, lf, ra, al, il)
source https://www.smashingmagazine.com/2018/07/improving-test-coverage-android-app-mockito-espresso/ via DerekPackard.com https://derekpackard.com/how-to-improve-test-coverage-for-your-android-app-using-mockito-and-espresso/ ——- “Transforming businesses through digital innovation — blazing through dreams, disruption and delivery.” These are the beginning words shared by Salesforce in its new “NorthStar” report. Over the last few months, Salesforce interviewed over 500 customers as well as executives and thought leaders to discuss their personal experiences, triumphs and challenges in their pursuits of digital transformation. I appreciate that I was on the company’s radar during the development of this report. I was asked to share my thoughts on the subject, and I graciously did. Even though, it’s easy to think that with all of the work we invest in a subject, that we are entitled to attention or notoriety, we’re not. There’s always someone else who’s smarter, more captivating or better at self-promotion. At best, we can simply be humbled in the reality that life is, in all of its nuances, with some crazier and some lovelier, only in the spotlight for moments at a time. Here are some of the ideas I shared with Salesforce… On dreams: “Customer experience has become the tried and true catalyst for digital transformation. It’s about bringing disparate groups in your company together in order to modernize. On the customer journey, for example, you really need that purpose and focus to align the various parts of your business. “Organizations need to have a real sense of purpose. For example, when it comes to how customers are evolving, companies need to determine what to do to align with these changes and ultimately get ahead of them. “The ‘dreams’ stage forces people to get together and be honest about what they have and what they need. Part of it is about the supporting tech and part of it is about expertise and vision.” On disruption: “The nature of the organization is complex, but I have always said digital transformation is a human story. Tech is not the magical solution, it’s an enabler for something bigger. That takes vision – it takes people to work together to bring it to life. “Leaders must create almost a ‘culture 2.0’ – a new model of working with a new generation of expertise. This is why we’re starting to see things like special teams or innovation centers that operate in a new world without being plagued or shackled by what exists in an organization’s legacy setup. In my research, culture has consistently come up as the number one inhibitor of digital transformation and corporate innovation. But when culture is designed to be collaborative, productive and innovative, it’s also the number one driver for digital and business transformation.” On delivery: “The topic of digital transformation is a difficult conversation, particularly around who owns what. Digital transformation and corporate innovation are often viewed by the board and shareholders as costs against the bottom line, so we therefore only see incremental iterations of innovation. “Ultimately though, to start change, you need a change in behaviors, incentives and business models. There’s no one path to get there, but it’s worth looking at the culture and questioning whether employees are empowered to work differently. “The same things that are forcing customers to evolve are forcing employees to change, too. What you end up seeing is a more customercentered team that is more collaborative and cross-functional. Digital transformation is a crossfunctional force and runs across the entire enterprise.” I hope this helps you… Brian SolisBrian Solis is principal analyst and futurist at Altimeter, the digital analyst group at Prophet, Brian is world renowned keynote speaker and 7x best-selling author. His latest book, X: Where Business Meets Design, explores the future of brand and customer engagement through experience design. Please, invite him to speak at your event or bring him in to inspire and change executive mindsets. Connect with Brian! Twitter: @briansolis The post Digital Transformation: Strategies for Success appeared first on Brian Solis. source https://www.briansolis.com/2018/07/digital-transformation-strategies-for-success/ via DerekPackard.com https://derekpackard.com/digital-transformation-strategies-for-success/ Do you run influencer marketing campaigns? Wondering how to determine the ROI of your efforts? In this article, you’ll learn how to measure the results of your influencer marketing campaigns. #1: Determine Your End Goal at the Beginning Before launching an influencer marketing campaign, you need to decide what you want to accomplish. Establishing an […] The post How to Calculate the ROI of Influencer Marketing Campaigns appeared first on Social Media Examiner. source https://www.socialmediaexaminer.com/calculate-roi-influencer-marketing-campaigns/ via DerekPackard.com https://derekpackard.com/how-to-calculate-the-roi-of-influencer-marketing-campaigns/ Market research firm GlobalWebIndex, which provides consumer insight data for marketing purposes for customers including Google, Spotify, WPP, IPG and Omnicom Group, has closed a $40 million Series A round. The funding is its first VC raise, almost a decade after the business was founded. The investment comes from New York-based growth fund Stripes Group, along with a number of other unnamed data, software and consumer technology companies. GWI says it will be used to accelerate product development and for international expansion, including in the U.S. and Asia. The company is based in London but has recently opened offices in New York City and Los Angeles, as well as having technology hubs in locations across Europe. With the new funding it says it’s planning to open more international offices across the Americas and Asia Pacific to support a client base which spans more than 80 countries. But why take VC now? “After nine years with no funding and seeing phenomenal growth and expansion, we are still seeing an increasing demand for our data, especially from companies that we haven’t traditionally sold to,” says CEO Tom Smith. “The new funding will support our product development and hiring efforts so we can establish ourselves as the go to platform for digital consumer insights for the marketing industry.” The company believes it’s positioned itself on the right side of digital history, having chosen an opt-in, survey-based route for gathering a chunk of its consumer data for market research purposes — putting detailed questions to its global panel of 22 million web users from whom it’s gaining up front consent to their data being processed. Europe’s new data protection framework, GDPR, is explicit on the need for consent to be informed, specific and freely given if that’s your legal basis for processing people’s personal data. On the product development front, GWI says it’s working to develop new ways of collecting consumer data — having developed a proprietary, device-agnostic “messenger-style survey tool” which Smith says allows respondents to “answer questions at times and in formats which suit them”. “It’s about putting the consumer first — not just in how their data is used, but how you run the survey itself. With this new approach we hope to be able to return survey results faster to our clients, so they can make quick business decisions based on insights retrieved from our tried and tested methodology,” he adds. “Years before GDPR, we wanted to be respectful to those who take one of our surveys, meaning that they see consumer-centric privacy and consent notices which use easy-to-understand language to outline what we do, why it’s important to our clients, and what their responses will be used for.” “We ask our respondents a wide range of questions relating to their digital lives and lifestyles,” he continues. “This covers everything from their social media, device, media consumption and online behaviors to their interactions with brands, their attitudes and their daily life. For us, it’s key to understand not just what people are doing online, but the attitudes, motivations and beliefs which drive this.” GWI’s primary product offering is its core study — which is fielded in 44 countries, and which it says contains 25,000 data points on 22M+ “connected consumers”. “Each year we interview hundreds of thousands of representative individuals about their digital lives. The aggregated results of this are made available on our industry-leading platform on a syndicated basis, where clients can build and then analyze any audience they like. For example, you could look at Older vs Younger Millennials, Mums vs Dads, Instagrammers vs Snapchatters — in each case, understanding which behaviors and attitudes are unique to each group,” explains Smith. It also offers a range of custom services to supplement that core survey-based market intelligence data. “Many clients use this offering to ask follow-up questions to our respondents, allowing them to overlay the answers to their bespoke questions with the 25,000 data points contained in the core data set,” he says, adding: “We also offer a wide range of other research solutions such as brand tracking, path to purchase journey, ad-effectiveness, concept testing, website analytics and more. Here the sheer scale of our panel — currently at 22M consumers — is a real differentiator.” All survey respondents are compensated for their time, according to Smith — in different ways, depending on the market, but including via monetary payments, vouchers, loyalty points, charitable donations etc. One thing to note is that GWI does also use cookie-based tracking to gather data less directly — including by working with partners. So it is also reliant on third parties obtaining consent to data processing, and must therefore rely on those partners to cleanly and fairly obtain consent for this portion of its market intelligence activity. “In some instances, the cookies we use as part of our research are dropped by the research panels we work with, rather than by GlobalWebIndex itself. In these instances, all such panels are required to obtain consent in GDPR-compliant manners,” says Smith on this. The company tells TechCrunch it uses cookie tracking to enrich its core survey data, and only uses cookies to track the behaviors of its panelists — and only those who have actively opted in to this type of tracking. “Our analytics technology connects the data we collect through surveys to the behaviors of our panel on client websites and connected properties, as well as their exposure to digital advertising campaigns. In this way, we can leverage the 25,000+ data points we collect through panelist interviews to their browsing behaviors and online activities, providing a unique connection between brand engagement and the attributes, motivations and interests of our clients’ target audiences.” “The GDPR was welcome validation of the approach we have always adopted, whereby respect for the consumer is central,” adds Smith. “Given that we have a direct relationship with the individuals who complete our surveys, we have an amazing opportunity to outline there and then what we want to do with their responses, and to gain their explicit consent for the use of cookies. “The nature of survey-based market research also means that the consumers know which types of data they are providing, and can decline to answer certain questions if they so choose.” So why does a company like Google — which has access to vast, global consumer data stores of its own, gathered from its own products and via a network of online tracking cookies and pixels — need GWI’s market intelligence? “Many of our clients have their own proprietary sources of consumer data but turn to GlobalWebIndex because of the robust, global, independent view it offers on consumer behaviors,” Smith responds on this. “Our ability to give a 360-degree view on the consumer is particularly valuable, with our data providing a unique cross-device, cross-platform perspective.” On the competition front, he names the likes of Nielsen, YouGov, Comscore, Kantar, GfK and Simmons. “We provide a global view which is consistent across countries, unlike some alternatives which operate different surveys at different times and then patch them together,” he argues. He also touts the “incredibly rich view of the consumer’s digital life” the GWI consumer panel is able to generate, given the number of data points it’s gathering. “We have this depth on all of our respondents, whereas some other sources will only have small pockets of data on each individual,” he claims. “We track behaviours and attitudes from the consumer’s perspective. There are no inferences, no modeling, no assumptions based on browsing. This is how the consumer acts and feels from their own point of view. “We provide up-to-the minute data which tells you what people are doing in the here and now. Our quarterly releases will soon move to monthly, and from there we’ll develop a real-time version of our data set.” “Our ability to re-interview our respondents is hugely important for clients, as it allows them to sync their bespoke questions with the 25,000 data points from the core study. It’s a hugely quick and efficient way to gain a rich understanding of your target audience,” he adds. via DerekPackard.com https://derekpackard.com/market-research-firm-globalwebindex-takes-first-vc-with-40m-series-a/ PicsArt, the company behind the photo-editing app of the same name, has hired Tammy Nam as its first chief operating officer. Nam was most recently the CEO of Viki, the Rakuten-acquired video streaming service, and before that served as a marketing executive at Viki, Scribd and Slide. PicsArt said Nam will report to founder and CEO Hovhannes Avoyan, and that she will oversee all aspects of the business except for product and engineering. “PicsArt has grown organically so far, but our next big opportunity is in directing this growth through the right market development, community engagement and revenue channels,” Avoyan said in the announcement. “In addition to her proven operational experience in both consumer advertising and subscription-based businesses, Tammy adds deep bench strength in market, brand and community development — areas that will be critical for us moving forward.” The company announced last year that it’s reaching 100 million monthly active users. Nam told me she was particularly impressed that it achieved that growth without significant marketing spend. “I understand what it takes to grow quickly, but also thoughtfully,” she said. “Because of my background, the CEO and the board felt like I would be a great match to [help PicsArt] reach the next 200 million, the next 500 million users.” Asked what thoughtful growth looks like for PicsArt, Nam said it means not just growing at any cost, but also considering things like revenue and the different communities using the app. She said she’s trying to examine the company’s structure to ensure it can “maximize efficiencies towards these big goals.” “It will continue to grow organically, but the branding, the user development will definitely evolve,” she added. “There’s a sea of companies that play in our space … How do you stand out? And how do you stay relevant?” Nam also said that she’ll be looking at PicsArt’s opportunities for international growth. Not that the company has been neglecting the world beyond the United States — China is its fastest-growing market and already one of its top countries for revenue. (The company says it recently became profitable following the launch of its PicsArt Gold subscription.) Nam suggested that PicsArt can move into new markets without competing with the dominant social media platforms, because it’s “agnostic” in terms of where users publish their edited photos. “It’s completely lowered the barrier,” she said. “It used to be you had to know Photoshop. Now it’s so easy to create professional-looking photos, images and soon animations, videos, etc. Everyone is a creator.” source https://techcrunch.com/2018/07/24/tammy-nam-joins-picsart/ via DerekPackard.com https://derekpackard.com/former-viki-ceo-tammy-nam-joins-picsart-as-its-first-coo/ It’s past your bedtime. Do you know where your private personal data is? Do you know who has access to that data? Your answers are probably ‘No’. That’s because you’ve handed over a lot of private data to service providers on the internet and trusted that they’re protecting you and that data. Recent events have shown that’s not always the case and a new law in California aims to fix that. New legislation will add significant privacy protections for Californians and place new burdens on businesses. While the new legislation applies only to residents of California, most businesses will have customers in the state and do collect some level of private information from customers, so this legislation has broad implications for marketers even outside the state. Earlier this year law makers in California introduced sweeping consumer privacy legislation. The California Consumer Privacy Act of 2018 unanimously passed in the California State Assembly and Senate, was signed into law by the Governor and will go into effect in 2020. The Act is the most sweeping consumer privacy legislation ever passed in the United States and gives consumers broad control over personal information collected by businesses. The law is not specific to any one digital channel, but spans all channels where personal information is collected, stored and used by marketers. Californians will have the following rights under the law:
Businesses have enjoyed great freedom in how they collect and use consumers’ private information. Consumers have had little recourse when their private information is compromised. Recent high-profile incidents involving private consumer data collected by marketers in the digital realm have rattled users of social media and other internet services. Data breaches exposed millions of consumers’ credit information. Consumers’ social media data was misused by Cambridge Analytica. Users’ trust of these services is eroding. The law will enact several requirements which will directly impact how marketers interact with consumers in California and manage their personal information across a broad range of marketing media. These requirements include:
When the Act goes into effect in 2020 marketers must be ready to comply, with new procedures, processes and customer facing tools. Companies will also need to decide if they will treat California consumers differently from those outside California. The law will be enforced by the Attorney General of California, and the Act creates a “Consumer Privacy Fund” to offset costs of enforcing the Act. Consumers will also have a private right of action if companies fail to adequately protect their personal information under the requirements of the Act. Penalties for data breaches are also laid out in the Act. This legislation, and others like the recently enacted General Data Protection Regulation (GDPR) in the European Union, reflect a rising tide of personal data protection for consumers. The message from these enactments is clear: consumers must maintain primary control over their own personal information and businesses must provide access, transparency and strong safeguards to protect consumers’ personal information. Marketers should study this new legislation and start planning now on how to comply. 2020 will approach quickly, and businesses that are not ready to comply may be subject to penalties if they don’t meet the requirements of the Act. via DerekPackard.com https://derekpackard.com/the-california-consumer-privacy-act-of-2018-do-you-know-where-your-personal-data-is/
As retailers continue to move up the marketing maturity model, the use of segmentation becomes more and more integral to their marketing programs. The question becomes less about “Should we segment?” to more about “How should we segment?” or the even more critical “What will we do with those segments?”
Segmentation, in its simplest form, is about separating groups of customers by a specific characteristic, behavior or need into smaller, more targeted groups. The key to effective segmentation is in using data and analytics to identify what those characteristics, behaviors or needs are so that we can more effectively take action on them and in turn, help customers more easily and successfully achieve their goals. But first, retailers need to start with the questions they are looking to answer.
For example, if a retailer has a wide variety of SKUs at vastly different price points, they should be considering how customers are uniquely interacting with those products. Do they have customers who only buy those higher ticket items or other customers who only buy lower ticket items? Are they featuring the same merchandise and messaging to those groups of customers the same or differently? What about customers who have an affinity towards discounting or those who don’t have a problem paying the full price if they can get the newest, hottest must-have item as soon as it hits the market? Having a peak into what makes those different customer segments unique should impact a marketing program and how it is designed.
So how do we know what segments to create that will be valuable to the organization? The first step is identifying what goals and objectives you are trying to achieve. Is growing the customer base through acquisition a key company goal? If so, it might make sense to start by looking at groups of customers by how they were acquired and then grouping those sources into more profitable vs. less profitable segments. Is retaining and growing your customer base the main focus of your organization? – Then identifying who your profitable customers are and grouping them into how they engage or purchase could be a good starting point.
Once you have identified a starting point and are ready to create your segments – there are a few things to consider before moving forward. According to Harvard Business Review, segmentation should include these six characteristics: identifiable, substantial, accessible, stable, differentiable and actionable.
Each segment needs to be clearly defined and large enough to incorporate into your marketing program to the point where it is not cost prohibitive to break out independently. The segments need to be constant and unique in their definitions as well as being easy to work with in terms of reach and accessibility.
However, the key difference-making characteristic is ensuring the segments are actionable. This is the primary reason segmentation can be so valuable. Once a retailer has identified how to reach a segment and take action on it – they can then tie the impact of their marketing efforts to their segmentation and drive true value. It’s how we meet the customers where they are, and start talking to them in a way that makes a difference. When you have that piece established, you are well on your way to making your segments valuable and ultimately working towards achieving those overall goals.
source http://blog.listrak.com/2018/07/unlocking-secrets-of-segmentation.html via DerekPackard.com https://derekpackard.com/unlocking-the-secrets-of-segmentation-2/
As retailers continue to move up the marketing maturity model, the use of segmentation becomes more and more integral to their marketing programs. The question becomes less about “Should we segment?” to more about “How should we segment?” or the even more critical “What will we do with those segments?”
Segmentation, in its simplest form, is about separating groups of customers by a specific characteristic, behavior or need into smaller, more targeted groups. The key to effective segmentation is in using data and analytics to identify what those characteristics, behaviors or needs are so that we can more effectively take action on them and in turn, help customers more easily and successfully achieve their goals. But first, retailers need to start with the questions they are looking to answer.
For example, if a retailer has a wide variety of SKUs at vastly different price points, they should be considering how customers are uniquely interacting with those products. Do they have customers who only buy those higher ticket items or other customers who only buy lower ticket items? Are they featuring the same merchandise and messaging to those groups of customers the same or differently? What about customers who have an affinity towards discounting or those who don’t have a problem paying the full price if they can get the newest, hottest must-have item as soon as it hits the market? Having a peak into what makes those different customer segments unique should impact a marketing program and how it is designed.
So how do we know what segments to create that will be valuable to the organization? The first step is identifying what goals and objectives you are trying to achieve. Is growing the customer base through acquisition a key company goal? If so, it might make sense to start by looking at groups of customers by how they were acquired and then grouping those sources into more profitable vs. less profitable segments. Is retaining and growing your customer base the main focus of your organization? – Then identifying who your profitable customers are and grouping them into how they engage or purchase could be a good starting point.
Once you have identified a starting point and are ready to create your segments – there are a few things to consider before moving forward. According to Harvard Business Review, segmentation should include these six characteristics: identifiable, substantial, accessible, stable, differentiable and actionable.
Each segment needs to be clearly defined and large enough to incorporate into your marketing program to the point where it is not cost prohibitive to break out independently. The segments need to be constant and unique in their definitions as well as being easy to work with in terms of reach and accessibility.
However, the key difference-making characteristic is ensuring the segments are actionable. This is the primary reason segmentation can be so valuable. Once a retailer has identified how to reach a segment and take action on it – they can then tie the impact of their marketing efforts to their segmentation and drive true value. It’s how we meet the customers where they are, and start talking to them in a way that makes a difference. When you have that piece established, you are well on your way to making your segments valuable and ultimately working towards achieving those overall goals.
source http://blog.listrak.com/2018/07/unlocking-secrets-of-segmentation.html via DerekPackard.com https://derekpackard.com/unlocking-the-secrets-of-segmentation/ |
Derek PackardDerek Packard has been producing compelling videos for over 25 years. In fact when Derek started shooting award winning video, editing required an air conditioned room and equipment costing a million dollars. Today his laptop provides better tools. At one point, over 20% of Fortune 500 companies owned at least one training series Derek had produced for experts like Ken Blanchard and Zig Ziglar. After working with corporate and government clients in California for many years, Derek compiled numerous national awards for his work. ArchivesNo Archives Categories |