To debug React Native apps in VSCode, we have to install React Native Tools extension in VSCode.

To setup debugging, go to debug panel -> create a launch.json file -> From the menu, select React Native.

This launch.json file will contain the debug configurations for our app. This file is located in the .vscode folder inside our app root folder.

Then, from the menu, select Attach to packager.

To add another configuration to the app, you can follow either of the methods below.

  1. Open the launch.json file -> click Add Configuration option shown at the bottom right corner.
  2. Run menu…

Install Android Studio with standard installation.

  • If you’re on Mac or Linux, there’s an additional step to follow.

Open Android Studio -> Configure -> SDK Manager -> You’ll be able to see the SDK Path

Open ~/.bash_rc or ~/.bash_profile and export ANDROID_SDK_ROOT variable and add it to the PATH as well.

  • If you’re on Mac, you will need to add platform-tools to thePATH

platform-tools location : android-sdk-path/platform-tools

Also, need to verify whether the JAVA_HOME variable is set. If it is not set, once you run the react-native run-android, it will give the below error.

> Could not find tools.jar

Extensions that will make our lives easier with React Native development

  • React Native Tools — built by Microsoft, we can debug react native apps inside VSCode.
  • React-Native/React/Redux snippets — Gives us a bunch of code snippets
  • Prettier — For code formatting
  • Material Icon Theme — With this extension installed, we get material icons

Need to set default code formatter to Prettier using below configuration.

Code -> Preferences -> Settings -> Search for "defaultformatter" -> Select "Prettier - Code Formatter" 

One other setting in VSCode which we can use for code auto-formatting.

Code -> Preferences -> Settings -> Search for “formatonsave” -> Enable the option

The moment we save our changes, our code gets re-formatted. VSCode will use Prettier to format our code.

To install the required dependency packages

sudo apt-get -qq update sudo apt-get install \   git mysql-server apache2 libapache2-mod-php \   php php-mysql php-gd php-curl php-apcu php-cli php-json php-mbstring \   || failed 

To enable mod_rewrite in Apache

sudo a2enmod rewrite

To enable mod_php

sudo apt install libapache2-mod-php7.4
sudo a2enmod php7.4

To make changes in the default PHP config, need to open the php.ini file and set the following configs.

sudo vim /etc/php/7.4/apache2/php.inifile_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = asia/singapore

After saving the above configs, need to restart the…

As you all know, Expo apps are React Native apps which contain the Expo SDK. It’s an easy and time saving method to get started with react native. Jest is a test framework for react-native apps.

In this article I’m going to tell you the basic steps to setup jest tests with an Expo app.

To setup your app with jest, follow the steps below.

  1. Add the following devDependencies in package.json
"devDependencies": {"@types/jest": "^22.2.3","@types/react": "^16.3.10",
"@types/react-dom": "^16.0.5",
"@types/react-native": "^0.55.2",
"@types/react-test-renderer": "^16.0.1",
"concurrently": "^3.5.1",
"jest-expo": "26.0.0",
"react-native-scripts": "1.13.1",
"react-test-renderer": "16.3.0-alpha.1",
"rimraf": "^2.6.2",
"ts-jest": "^22.4.2",
"tslint": "^5.9.1",
"typescript": "^2.8.1"

React Native let the developers to create mobile apps with rich mobile UI declarative components.

When we are building React Native apps, there can be some requirements for the app to run some background tasks. Couple of these are;

* Downloading content

* Uploading content to some server

* Data/media processing

These are time consuming tasks, which need to run continuously regardless of the app status being foreground or background.

In such situation, React Native Queue helps us achieve the background tasks by allowing us to create tasks and keeping them in a persistent queue until the tasks are completed.

I recently started off with mobile application development using react native. In this blog post I’m going to teach you the basic steps that need to be followed to create a React Native Android App and run it on Android Emulator.

  1. Create a Standalone app in react-native.
react-native init MyApp

2)Create a new device on Android Emulator and start it. Then check if the device is available, using following command.

adb devicesList of devices attached
emulator-5554 device

2) Go inside the MyApp folder. Then run the below command to install the app on the started device.

cd MyApp

These are the final few weeks of Outreachy Internship with Cadasta. After implementing the test execution order and making the test suites I had a review with Kate and David.

Kate suggested me few things there.

  • Having an input into the cadasta-test of which server the tests should be run against. ie. ./runtests <server-url>
  • Making the test suites re-runnable multiple times on the same server without cleaning the Cadasta DB.

Re-runnable cadasta-test test suites are implemented in this way. Every time someone runs ./runtests <server-url>, it will create a new user having username cadasta-test-user-x. Here, x is the next available…

During the code reviews I had with Kate, there were requirements to implement the execution order of the Cadasta Selenium test cases and to get rid of Django dependencies. That means to make cadasta-test purely python.

Since I’ve already completed User Accounts, Projects and Organizations related UI test automation, I started finding a way to include the above requirements.

Then I learnt about the python test suites. The article[1] which demonstrates the use of test suites in python guided me well. Thus I created separate test suites for Accounts, Projects and Organizations. …

In my last post I’ve brought to you the most interesting part of the Selenium test case implementation I’ve faced so far. There were few more such challenging things, but thanks to Cadasta team I managed to resolve the issues.

One of the major milestones of my internship project has been completed. I could finish implementing almost all the test case falls under the category of Projects. Not only that, documenting the test cases in cadasta-test repo wiki also done!

You can find them here.

So with this achievement, my internship project is halfway done. Waiting for the mid evaluations with my mentors :)

Manorama Perera

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store