Saturday, June 6, 2020

Flutter vs Xamarin vs React Native



What is cross-platform development?

Cross-platform mobile app development allows you to build mobile applications for multiple platforms such as iOS and Android with just one technology stack.
This means that instead of creating multiple versions of your app, each written using the dedicated native language for each platform, you can write your code once and deploy it on several platforms at once.

Cross-platform development advantages

There are several pros when it comes to cross-platform mobile app development compared to native mobile app development, including:

Write once, deploy everywhere

The most significant advantage of cross-platform development is having a single codebase that you can export to multiple operating systems.

Uniformity across apps

Having a single shared codebase allows you to maintain the same look, feel, and experience across all platforms. All updates and fixes are also automatically reflected everywhere.

Saving resources

Instead of having separate teams with different skill sets working on multiple native versions of your app, you only need one team working on a shared codebase. This allows you to leverage smaller teams and quicker development time to save time and money.

Audience reach

Having your app published on multiple platforms allows you to increase your market reach without any added effort, consequently increasing your chances of getting more downloads and users.

Cross-platform development disadvantages

While cross-platform development comes with many benefits that make it an optimal solution for many developers and companies, they come with a few drawbacks and some trade-offs including:

Performance issues

While cross-platform frameworks work on providing apps that are as close to native apps as possible, they still don’t integrate seamlessly with the respective platforms and have inconsistent communication between the native and non-native components, reducing the  app’s speed and degrading performance.

Inconsistency with platforms

Cross-platform development tools don’t have all the features offered by each different platform, so you might need to employ some workarounds. It may also take these frameworks some time to get up-to-date with the newest features and updates released by the platforms.

Limited features

There are many native-only features and integrations available in each platform that are not available in cross-platform apps, which limits the user experience you can provide.

Cross-platform mobile app development tools

There are many cross-platform mobile app development tools and frameworks available, including:
We will take a closer look at the first and arguably most popular three frameworks available right now: Flutter, React Native, and Xamarin.

Flutter

Flutter framework logo
Flutter is an open-source, cross-platform mobile application development framework created by Google in 2017. It’s the newest framework of the three and in short order has become one of the most popular frameworks among front-end devs.

Flutter advantages

Some of the reasons Flutter is currently one of the most loved cross-platform frameworks include:
  • Complete development ecosystem: Flutter offers APIs, pre-built widgets, CLI tools, and pretty much all the tools needed for cross-platform mobile app development.
  • Customizable: While it offers an extensive library of pre-built widgets, you can also create your own or customize pre-existing ones.
  • Reliability: Developed and supported by Google
  • Hot reload: Allows developers to fix bugs faster through faster code implementation
  • Free: Open-source platform

Flutter disadvantages

Flutter poses a few challenges, especially being a new framework, including:
  • Large app size: Flutter apps can be quite large compared to other frameworks that can force developers to reduce the number of libraries and packages used, compress images, and even steer away from using animation altogether in favor of reducing their app’s size.
  • Native APIs: Flutter doesn’t expose many native APIs for you to use. That’s why, for many purposes, you will need third-party packages. Which also means that you will have to depend on the ecosystem.
However, you can always write your own native code that accesses the needed feature, and Flutter will give you a bridge to use that feature from within your Dart code.

Apps built using Flutter

  • Google AdWords
  • Google Greentea
  • Alibaba
  • AppTree
  • Reflectly
  • Hookle
  • Topline
  • Birch Finance
  • OfflinePal
  • Hamilton (musical)
  • BetaBubs

Flutter development tools

React Native

React logo
React Native is an open-source, cross-platform mobile app development framework created by Facebook in 2015.
It enables users to use JavaScript and React along with native platform capabilities to build mobile apps.

React Native advantages

Some of the pros of React Native include:
  • User Interface: Implements native UI components, allowing apps to look like native apps, and therefore providing a high-quality user interface.
  • Ready-made components: Offers a vast library of UI components, allowing for faster development time.
  • Access to native functionalities: Like camera, accelerometer, etc.
  • Platform-specific code: Allows you to further optimize your separate native apps by using native code.
  • Hot reload: Allows developers to apply changes to the apps right away without having to recompile the apps.
  • Reliability: Developed and supported by Facebook.
  • Free: Open-source platform.

React Native disadvantages

Unfortunately, React Native still has its pitfalls, including:
  • Navigation: Navigation built in React Native is not seamless and not comparable to native navigation.
  • Complex UI: React Native struggles with building complex animation and transitions.

React Native development tools

Apps built using React Native

  • Facebook
  • Facebook Analytics
  • Facebook Ads Manager
  • Instagram
  • Uber Eats
  • Tesla
  • Skype
  • Pinterest
  • SoundCloud Pulse
  • Walmart
  • Bloomberg
  • Discord
  • Myntra
  • Gyroscope
  • Chop
  • Vogue
  • Artsy
  • F8

Xamarin

Xamarin logo
Xamarin is an open-source, cross-platform mobile app development framework that was founded in 2011, making it the oldest of the three.

Xamarin advantages

Xamarin cross-platform mobile app development pros include:
  • Performance: Xamarin apps are known for having almost native-like performance levels.
  • Complete development ecosystem: C#, .Net, and Microsoft Visual Studio with Xamarin are all you need to build mobile apps with Xamarin, making it one of the most complete cross-platform mobile app development frameworks out there.
  • Seamless user experience: Xamarin.Forms allows you to take advantage of standard interface elements by providing a library of templates so that you can reuse your code across different platforms. You can also use Xamarin.iOS and Xamarin.Android for manual customization, if needed.
  • Free: For small teams.

Xamarin disadvantages

However, as any cross-platform development framework, Xamarin does have its setbacks, including:
  • Updates delay: Whenever new platform features or updates roll out, there is usually a delay until these changes are reflected in the Xamarin tools, which may cause issues with your app.
  • Large app size: Xamarin apps can add around 5 megabytes for releases and 20 megabytes for debug builds, making them larger than native apps. This is primarily due to the libraries used to translate C# calls into native calls.
  • Heavy graphics: Xamarin is great for apps with a simple UI. However, building complex applications or mobile games with Xamarin might not be the best thing to do as you will have to spend a lot of time writing platform-specific code, which defeats the purpose of using it.
  • Platform-specific code: You might need to re-write some parts of the UI in your app in native code. That means that you will need some knowledge in native programming languages such as Kotlin or Java for Android, and Swift or Objective-C for iOS.

Xamarin development tools

Apps built using Xamarin

  • Skulls of the Shogun
  • SuperGiant Games
  • Storyo
  • Insightly
  • FreshDirect
  • The World Bank
  • Just Giving
  • Olo
  • Thermo Fisher Scientific
  • APX

Flutter, React Native, or Xamarin?

Now let’s look at how these cross-platform development tools compare to each other.

Performance

One of the most important factors you should consider when choosing a cross-platform development framework is app performance.
While React Native and Xamarin provide near-native app performances, some argue that Flutter’s performance is better because Dart code is compiled to a C-library, which means it’s close to the native code.
This improves communication speed and provides better performance.
However, it’s hard to benchmark performance as it depends on many factors and variables including device, code, app, and features being used.

Popularity

A graph comparing Flutter, React, and Xamarin.
With over 1.6 million developers across 120 countries, Xamarin has definitely developed quite the userbase over the years. However, this is largely due to the fact that it is one of the oldest frameworks out there.
Since its release, React Native has slowly but surely gained popularity, surpassing Xamarin in 2017.
Most loved tools among front end developers.
According to the Stack Overflow Developer Survey 2019, Flutter ranked as the most loved framework out of the three, with 75.4 percent of users expressing interest in continuing to develop with Flutter.
React Native came in second with 62.5 percent, followed by Xamarin with only 48.3 percent.

Development languages

The cross-platform tool development language is another crucial factor to consider when making your decision.
Xamarin uses .Net languages like C# and F#, which are common languages and can be used to write native platform code.
While React Native uses JavaScript, which was not invented for it, it still does a great job with React Native apps.
You might encounter a few issues or come across some required workarounds as JavaScript was originally developed for the web.
As a result, some APIs might not work, while others may have to be proxied by React Native.
Flutter uses Dart, which was also not invented for mobile apps. However, it is managed by Google, the same company that created Flutter.
That’s why they make sure to adapt Dart for Flutter and mobile app development, making it better in many ways than JavaScript or C# with fewer workarounds needed.
Graph comparing different languages.
According to the TIOBE Programming Community Index, C# is the fifth most popular programming language worldwide as of October 2019, followed by JavaScript in seventh place.
While still relatively new, Dart is ranked as the 26th most popular programming language in the world.
This gives an advantage to React Native and Xamarin, which both work with a familiar language that can help boost your productivity and save you from enduring a steep learning curve.

Components

React Native offers some pre-built and partly adaptive components like buttons and text inputs.
However, most of these components aren’t really adaptive. If you need something a bit more advanced, you would have to build it yourself by recomposing these built-in components.
Flutter provides a more extensive library of components, which are called widgets. However, these pre-built components are non-adaptive.
The language offers widgets for both iOS and Android, but you have to switch between both manually as it doesn’t have components that automatically adjust their styles depending on the platform you’re running.
Xamarin.Forms offers a complete cross-platform UI toolkit consisting of native UI components for both platforms, which are compiled into platform-specific UI components.
You can also use Xamarin.iOS or Xamarin.Android for custom app UI and better performance.

Code reuse

Code reuse is what brings developers to cross-platform frameworks, so how much of the code written with each framework is actually reusable?
React Native allows you to write the code once and ship anywhere, but it also embraces platform differences.
This means that from time to time, you have to find out on which platform you’re running and load a different component or set of components depending on the platform you’re running.
Still, a considerable part of the codebase can still be reused.
Flutter’s codebase is more reusable as it allows you to define one UI widget tree and reuse the defined logic so you don’t have to do a lot of differentiation, which you can also still do if you need to.
Xamarin prides itself on allowing developers to reuse up to 96 percent of their C# code by leveraging the language.
Xamarin also offers forms components, making it better for code reuse than React Native and Flutter which share an average of 60–90 percent of codes.

Pricing

While all three tools are free, open-source platforms, Xamarin is only free for individuals and small companies.
For large enterprises, single-user licenses start at $499 and go anywhere up to $2,999 for a Visual Studio Enterprise annual subscription.
While this might not be a problem for large enterprises, the costs can still add up, which could cause bigger companies to go with React Native or Flutter.

Support and ecosystem

When choosing a framework, you should also consider its community support, especially if you’re new to it. This includes forums, documentation, tutorials, etc.
React Native has a pretty good amount of support out there. You can easily find a lot of learning material as well or developers on forums or QA sites like Stack Overflow to ask for support whenever you need any help.
Flutter is still relatively new, so it is yet to build a strong community like React Native. However, Google is investing heavily in it, and therefore it is expected to grow into a robust ecosystem in the future.
For Xamarin, support is quite limited. However, Microsoft provides some free Xamarin courses and learning paths to help you get started.

Conclusion

When choosing a cross-platform development tool, there is no one-size-fits-all option.
All three frameworks have proven successful in building great mobile apps. Your specific needs and preferences determine which framework is best for you.
Currently, Flutter seems to be the most popular option as it excels in terms of performance. So if you’re new to the world of cross-platform development, Flutter might be the way to go for you.
However, you can’t rule React Native and Xamarin out just yet as they still excel in other areas.
For example, if you already have some prior knowledge of JavaScript, then it might be wise to go with React Native.
At the end of the day, it all depends on what you’re building and what you hope to achieve. Any framework will have its pitfalls, but the one where the advantages heavily outweigh those setbacks would probably be the right choice for you.

DEFECT PREVENTION: REDUCING COSTS AND ENHANCING QUALITY

From software testing help
Effective Defect Prevention Approach and the Critical Views:
Quality Assurance is the term that is commonly used to address the testing teams in IT projects.
Technicalities aside, Quality assurance activities are not just targeted at defect identification (which is finding defects after they have happened. This simply is testing or Quality control) but also include defect prevention (making sure the defects do not happen in the first place or the defects are removed/reduced before making their way into the software product).
A simple equation equivalent can be:
QA= QC (defect identification) + Defect prevention
Although this sounds fairly simple, there is less emphasis or direction available on how or what exactly are defect prevention tasks.
The truth of the matter is, defects found during the testing phase or worse after release are costlier to find & fix and might cause a loss of trust on the brand. Hence, the earlier the prevention measures are taken, the better. Besides, defect prevention also helps companies achieve the highest CMMI (Capability Maturity Model Integration) Level.
Defect Prevention
Defect Prevention is a crucial step or activity in any software development process and as can be seen from the below diagram is pretty much half of our testing tasks:
Defect Prevention
In brief, the following are the defect prevention responsibilities for testers in each of the below stages:
#1) Requirement Specification Review:
After understanding customer’s requirements prepare your requirement’s gist.
A review is important at this step- the First level of review should be within the team, followed by another level of external review (by a dev or BA or client) to make sure that all the perspectives are in sync.
#2) Design Review:
Design stage can be considered a strategy stage of sorts and going through it will ensure that the QA team understands the pros and cons of each strategy.
This kind of critical walkthrough will help unearth any problems with the said strategies and fix them before going further.This can be considered a feasibility study for the strategy (or strategies).
#3) Code Review:
There is not a lot for testers to directly get involved in this phase, but the review does go on here too. Developers carry out code inspections, walkthroughs and reviews before they unit and integration test the application.

Defect Prevention Methods and Techniques

Some traditional and common methods that have been in use since a long time for defect prevention are listed below;
#1) Review and Inspection: This method includes the review by an individual team member (self-checking), peer reviews and inspection of all work products.
=> For more information on how this is carried out, please check our Test Documentation Reviews article.
#2) Walkthrough: This is more or less like a review but it’s mostly related to comparing the system to the prototype which will give a better idea regarding the correctness and/or the look-and-feel of the system.
#3) Defect Logging and Documentation: This method provides some key information, arguments/parameters that can be used to support analyzing defects.
#4) Root Cause Analysis: Root cause analysis includes two major approaches:
I) Pareto Analysis:
Pareto analysis is a formal and simple technique which helps prioritize the order of problem resolution for maximum impact. It states that 80% of the problem arises due to 20% reasons.
Therefore, the problems once identified are prioritized according to frequency and a detailed statistics based analysis is performed as to find which 20% of the reasons attributed to the 80% problems. By simply focusing on those 20% reasons and eliminating those, results are guaranteed while optimizing the extent of work involved.
II) Fishbone Analysis:
Also known as Ishikawa Analysis this method is a more visual root cause analysis technique. There are no statistics involved as this method is based on team-wide brainstorming. The following diagram helps understand this better.
The problem is first written on the rightmost side and on the horizontal line that passes through it, the various causes are listed. The branch that has the most cause-subclause bones (or lines/branches) is the problem that is most serious and that is to be worked towards elimination. This technique is also sometimes called cause and effect analysis.
Fishbone Analysis

TMM Level and Defect Handling by Test Organization

#1) TMM (Testing Maturity Model) is based on CMM i.e.; Capability Maturity Model.
#2) Defect Prevention involves many staff members and their collaborative effort at various stages which is the reason why it plays a prominent role in TMM level 5. e.g.; If a defect occurs frequently in any test case or procedure, the organization might allocate a group of staff members to analyze the defect and develop the plan containing actions for changes in the process with the problem.
#3) Some of the benefits of the defect prevention program are:
  • The staff gets motivated and are more aware
  • Customers satisfaction
  • Increased reliability, manageability and predictability
  • Enhanced continuous process improvement

Team roles and responsibilities

Three critical groups are involved in the process of defect prevention:
Manager's Role: 
  • For the success of any defect prevention program management must be strongly supportive.
  • The support can be in the form of resources, training, and tools which are required to implement the plan successfully.
  • Management should define the appropriate policy and should make some cultural changes if necessary.
  • Managers are supposed to promote discussions, distribution of common defect list and changes in the process.
Tester's Role:
  • Testers maintain the defect database which includes the collection of defect data.
  • Defect data must be updated at regular intervals and defect info should be kept current at all time.
  • To plan the implementation of change
Client's Role: 
  • The client plays a comparatively small or limited role but their commitment towards quality is critical.

Conclusion

Defect Prevention plays a major and crucial role in software development process. It helps manage the quality of the software product in a “sooner and cheaper” manner with the help of the techniques listed above.
It ensures that the problems get resolved early on without even making it to the application. It considers root cause finding as its primary means of identifying and eventually removing issues.
To maintain the quality of software is the responsibility of the core management and entire team including project lead, client, and every team member.

Friday, June 5, 2020

What is Embedded Software Testing?

From guru99

In this tutorial, you will learn

What are Embedded systems?

Embedded systems are the electronically controlled devices where software and hardware are tightly coupled. Embedded systems may contain a variety of computing devices. These are PCs incorporated in other devices to operate application-specific functions. The end user usually is not even aware of their existence.

What is Embedded Testing?

EMBEDDED TESTING is checking the functional and non-functional attributes of both software and hardware in an embedded system. The purpose of Embedded test is to verify and validate the Embedded software as well as hardware against client requirement.
Embedded Software testing checks and ensure the concerned software is of good quality and complies with all the requirements it should meet. Embedded software testing is an excellent approach to guarantee security in critical applications like medical equipment, railways, aviation, vehicle industry, etc. Strict and careful testing is crucial to grant software certification.

How to perform Embedded Software Testing

In general, you test for four reasons:
  • To find bugs in software
  • Helps to reduce risk to both users and the company
  • Cut down development and maintenance costs
  • To improve performance
In Embedded Testing, the following activities are performed:
1. The software is provided with some inputs.
2. A Piece of the software is executed.
3. The software state is observed, and the outputs are checked for expected properties like whether the output matches the expected outcome, conformance to the requirements and absence of system crashes.

Embedded Software Testing Types

Fundamentally, there are five levels of testing that can be applied to embedded software

Software Unit Testing

The unit module is either a function or class. Unit Testing is performed by the development team, primarily the developer and is usually carried out in a peer-review model. Based on the specification of the module test cases are developed.

Integration Testing

Integration testing can be classified into two segments:
  1. Software integration testing
  2. Software/hardware integration testing.
In the end, the interaction of the hardware domain and software components are tested. This can incorporate examining the interaction between built-in peripheral devices and software.
Embedded software development has a unique characteristic which focuses on the actual environment, in which the software is run, is generally created in parallel with the software. This causes inconvenience for testing since comprehensive testing cannot be performed in a simulated condition.

System Unit Testing

Now the module to be tested is a full framework that consists of complete software code additionally all real-time operating system (RTOS) and platform-related pieces such as interrupts, tasking mechanisms, communications and so on. The Point of Control protocol is not anymore a call to a function or a method invocation, but rather a message sent/got utilizing the RTOS message queues.
System resources are observed to evaluate the system's ability to support embedded system execution. For this aspect, gray-box testing is the favored testing method. Depending on the organization, system unit testing is either the duty of the developer or a dedicated system integration team.

System Integration Testing

The module to be tested begins from a set of components within a single node. The Points of Control and Observations (PCOs) are a mix of network related communication protocols and RTOS, such as network messages and RTOS events. Additionally to a component, a Virtual Tester can likewise play the role of a node.

System Validation Testing

The module to be tested is a subsystem with a complete implementation or the complete embedded system. The objective of this final test is to meet external entity functional requirements. Note that an external entity either be a person, or a device in a telecom network, or both.

Difference: Embedded testing and Software Testing

Software TestingEmbedded Testing
Software testing is related to software only.Embedded testing is related to both software as well as hardware.
On average 90% testing done in the world is purely manual black box testing.Embedded testing is done on embedded systems or chips it can be a black box or white box testing.
Primary areas of testing are GUI checks, functionality, validation and some level of database testing.Primary areas of testing are the behavior of the hardware for the no. of inputs given to it.
Software testing is majorly performed on client-server, web and mobile based applications.Embedded testing generally performed on the Hardware.
e.g., Google Mail, Yahoo Mail, Android applications.e.g., Machines of healthcare domain, Microcontrollers used in computers.

Challenges: Embedded Software Testing

Some of the challenges that one can face during Embedded software testing:

Hardware Dependency

Hardware dependency is among the main difficulties faced during embedded software testing because of limited access to hardware. However, Emulators and Simulators may not precisely represent the behavior of the actual device and could give a wrong sense of system performance and application's usability.

Open Source Software

The majority of the embedded software components are open source in nature, not created in-house and absence of complete test available for it. There is a wide range of test combinations and resulting scenarios.

Software vs. Hardware Defects

Another aspect is when software is being developed for a freshly created hardware, during this process high ratio of hardware defects can be identified. The found defect is just not limited to software. It may be related to hardware also.

Reproducible Defects

Defects are harder to reproduce/recreate in the case of the embedded system. That enforces the embedded testing procedure to value every defect occurrence substantially higher than in a standard case, other than to gather as much data as could sensibly be required to alter the system to find the foundation of the defect.

Continuous Software Updates

Embedded systems require regular software updates like the kernel upgrade, security fixes, different device drivers, etc. Constraints identified with the software updates influence makes bug identification difficult. Additionally, it increases the significance of build and deployment procedure.
Summary
There are some difficulties in testing embedded software testing that makes it more difficult than regular software testing. The most fundamental issue is the tight reliance on the hardware environment that is prepared simultaneously with the software, and that is regularly required to perform reliable software testing. Sometimes it is even difficult to test the software without custom tools, which effortlessly makes concentrating on testing in late stages exceptionally enticing.
One of the most important things is that you should think about is the fact that you should often opt for automated software testing. The embedded automated testing is a quicker process which would take some hours to complete, and in this way, the issue of your software is settled.

API interview questions

  https://www.katalon.com/resources-center/blog/web-api-testing-interview-questions/ Top 50+ Web API Testing Interview Questions [Ultimate l...