Tag Archives: continuous

HOW CAN I SET UP CONTINUOUS INTEGRATION FOR AUTOMATED TESTING

Continuous integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early. Setting up CI enables automated testing to run with every code change, catching bugs or issues quickly.

To set up CI, you will need a source code repository to store your code, a CI server to run your builds, and configuration to integrate your repository with the CI server. Some popular open source options are GitHub for the repository and Jenkins, GitLab CI, or Travis CI for the CI server. You can also use hosted CI/CD services that provide these tools together.

The first step is to store your code in a version control repository like GitHub. If you don’t already have one, create a new repository and commit your initial project code. Make sure all developers on the team have push/pull access to this shared codebase.

Next, you need to install and configure your chosen CI server software. If using an on-premise solution like Jenkins, install it on a build server machine following the vendor’s instructions. For SaaS CI tools, sign up and configure an account. During setup, connect the CI server to your repository via its API so it can detect new commits.

Now you need to set up a continuous integration pipeline – a series of steps that will run automated tests and tasks every time code is pushed. The basic pipeline for automated testing includes:

Checking out (downloading) the code from the repository after every push using the repository URL and credentials configured earlier. This fetches the latest changes.

Running automated tests against the newly checked out code. Popular unit testing frameworks include JUnit, Mocha, RSpec etc depending on your language/stack. Configure the CI server to execute npm test, ./gradlew test etc based on your project.

Reporting test results. Have the CI server publish success/failure reports to provide feedback on whether tests passed or failed after each build.

Potentially deploying to testing environments. Some teams use CI to also deploy stable builds to testing systems after tests pass, to run integration or UI tests.

Archiving build artifacts. Save logs, test reports, packages/binaries generated by the build for future reference.

Email notifications. Configure the CI server to email developers or operations teams after each build with its status.

You can define this automated pipeline in code using configuration files specific to your chosen CI server. Common formats include Jenkinsfile for Jenkins, .travis.yml for Travis etc. Define stages for the steps above and pin down the commands, scripts or tasks required for each stage.

Trigger the pipeline by making an initial commit to the repository that contains the configuration file. The CI server should detect the new commit, pull the source code and automatically run your defined stages one after the other.

Developers on the team can now focus on development and committing new changes without slowing down to run tests manually every time. As their commits are pushed, the automated pipeline will handle running tests without human involvement in between. This allows for quicker feedback on issues and faster iterations.

Some additional configuration you may want to add includes:

Caching node_modules or other dependencies between builds for better performance

Enabling parallel job execution to run unit/integration tests simultaneously

Defining environments and deploy stages to provision and deploy to environments like staging automatically after builds

Integrating with slack/teams for custom notifications beyond email

Badge status widgets to showcase build trends directly on READMEs

Gating deployment behind all tests passing to ensure quality

Code quality checks via linters, static analysis tools in addition to tests

Versioning and tagging releases automatically when builds are stable

Continuous integration enables teams to adopt test-driven development processes through automation. Bugs are found early in the commit cycle rather than late. The feedback loop is tightened and iteration speeds up considerably when testing happens seamlessly with every change. This paves the way for higher code quality, fewer defects and faster delivery of working software.

CAN YOU PROVIDE MORE DETAILS ON HOW TO USE GITHUB ACTIONS FOR CONTINUOUS INTEGRATION AND DEPLOYMENT?

GitHub Actions makes it easy to automate software builds, tests, and deployments right from GitHub. Any time code is pushed to a repository, Actions can run jobs that build, test, deploy, or nearly anything else you can script. This allows you to set up continuous integration and deployment (CI/CD) directly in your code repository without needing to provision or manage separate build servers.

The first step is to configure a workflow file in your repository that defines the jobs and steps to run. Workflows use a YAML format and are typically named .yml files stored in the .github/workflows directory. For example, a basic build and test workflow could be defined in .github/workflows/build-and-test.yml.

In the workflow YAML, you define a “jobs” section with individual “build” and “test” jobs. Each job specifies a name and runs on a specific operating system – typically Linux, macOS, or Windows. Within each job, you define “steps” which are individual commands or actions to run. Common steps include actions to check out the code, set up a build environment, run build commands, run tests, deploy code, and more.

For the build job, common steps would be to checkout the source code, restore cached dependencies, run a build command like npm install or dotnet build, cache artifacts like the built code for future jobs, and potentially publish build artifacts. For the test job, typical steps include restoring cached dependencies again, running tests with a command like npm test or dotnet test, and publishing test results.

Along with each job having operating system requirements, you can also define which branches or tags will trigger the workflow run. Commonly this is set to just the main branch like main so that every push to main automatically runs the jobs. But you have flexibility to run on other events too like pull requests, tags, or even scheduled times.

Once the workflow is defined, GitHub Actions will automatically run it every time code is pushed to the matching branches or tags. This provides continuous integration by building and testing the code anytime changes are introduced. The logs and results of each job are viewable on GitHub so you can monitor build failures or test regressions immediately.

For continuous deployment, you can define additional jobs in the workflow to deploy the built and tested code to various environments. Common deployment jobs deploy to staging or UAT environments for user acceptance testing, and production environments. Deployment steps make use of GitHub Actions deployment actions or scripts to deploy the code via technologies like AWS, Azure, Heroku, Netlify and more.

Deployment jobs would restore cached dependencies and artifacts from the build job. Then additional steps would configure the target environment, deploy the built artifacts, run deployment validation or smoke tests, and clean up resources after success or failure. Staging deployments can even trigger deployment previews that preview code changes before merging into production branches.

You have flexibility in deployment strategies too, such as manually triggering deployment jobs only when needed, automatic deployment on branch merges, or blue/green deployments that mitigate downtime. Secret environment variables are used to securely supply deployment credentials without checking sensitive values into GitHub. Rolling back deployments is also supported through manual job runs if needed.

GitHub Actions makes CI/CD setup very approachable by defining everything in code without additional infrastructure. Workflows are reusable across repositories too, so you can define templates for common tasks. A robust set of pre-built actions accelerate development through automated tasks for common languages and platforms. Actions can also integrate with other GitHub features like pull requests for code reviews.

GitHub Actions streamlines continuous integration and deployment entirely in GitHub without separate build servers. Defining reusable workflows in code enables automated building, testing, and deploying of applications anytime changes are introduced. Combined with GitHub’s features for code hosting, it provides developers an integrated workflow for optimizing code quality and delivery through every stage of the development process.

WHAT ARE SOME EXAMPLES OF WEARABLE FITNESS TRACKERS AND CONTINUOUS GLUCOSE MONITORS?

Fitness Trackers:

Fitbit Charge 5 – One of Fitbit’s most popular trackers, the Charge 5 tracks steps, distance, active minutes and calories burned. It also monitors heart rate, offers exercise modes, sleep tracking and more. It has a color touchscreen display, connects to the Fitbit app and offers features like guided breathing sessions. Battery lasts around 7 days. Retails for around $150.

Apple Watch Series 7 – The latest Apple Watch has a larger display area and faster charging than previous models. It tracks activities, workouts, heart rate, sleep and more. Offers ECG app, fall detection and integration with Apple Fitness+ workouts. Connects to iPhone and various apps. Battery lasts around 18 hours. Pricing starts at $399.

Garmin Vivosmart 5 – A simple, durable tracker from Garmin that monitors steps, distance, sleep, calories and intensity minutes. Heart rate is monitored continuously. Offers relaxation timer, breathing sessions and estimated stress levels. Connects to the Garmin Connect app on phone. Battery lasts 7 days. Around $150.

Samsung Galaxy Watch5 – The latest Galaxy Watch runs Wear OS and offers extensive health/fitness tracking including heart rate, ECG, blood oxygen, body composition, sleep and over 90 workout modes. Has GPS, LTE option, ecobattery modes claims 1.5 days on a charge. Integrates with Samsung Health. Starts around $280.

Xiaomi Mi Smart Band 6 – An affordable basic tracker that monitors steps, calories, distance, sleep, heart rate and offers over 30 exercise modes. Has AMOLED color touch display. connects to Mi Fit app. Can receive call/app notifications. Battery lasts around 14 days. Only $50.

Continuous Glucose Monitors:

Dexcom G6 Continuous Glucose Monitoring System – Considered the top CGM available, the Dexcom G6 displays glucose levels every 5 minutes. Small sensor inserts under the skin and transmits to a receiver/sharing device. Smartphone app where readings are viewable and to set alerts. Sensor lasts 10 days. Requires fingerpricks for calibrations. Around $400/month if not covered by insurance.

Abbott Freestyle Libre 2 – Like the Dexcom, it has a small sensor inserted that lasts 14 days and transmits readings every minute to a reader or smartphone. No finger pricks needed except initial calibration. Provides glucose trend arrows and customizable alerts. Readings accessible via an app. Retails around $75/14 days but costs vary by insurance coverage.

Medtronic Guardian Connect – Considered the most discreet CGM device, it has a small sensor inserted that lasts 6 days and transmits to a separate transmitter clipped to clothes. Readings viewed on smartphone app. Provides custom alerts, thresholds and shares data with healthcare providers. Sensors need to be changed every 6 days. Monthly costs vary by insurance but often over $100/month.

Eversense Continuous Glucose Monitoring System – Unlike other CGMs, the Eversense sensor inside the body lasts 90 days and is inserted under the skin by a health provider. It transmits to a smart transmitter worn on the arm that displays readings. No fingerpricks needed once sensor inserted. Sensor and transmitter replaced every 3 months. Majority of costs often covered by insurance due to longevity.

All CGMs allow diabetics to closely monitor their glucose levels to better manage their diabetes through diet/exercise/medication adjustments based on the continuous readings. This helps avoid dangerous highs and lows. Insurance coverage and costs remain barriers preventing greater access and adoption of this important medical technology for many people with diabetes.

Fitness trackers have become ubiquitous wellness devices in recent years that allow users to easily track their daily activities, exercise, sleep quality and other health metrics from their wrist. While basic trackers just monitor steps, distance, activity etc, higher-end models from Apple, Samsung, Fitbit offer extensive workout tracking options, heart rate monitoring, ECG/EKG functions, stress tracking, sleep analysis and more. The wide array of trackers at various price points has democratized health monitoring for the masses while also sparking healthy competition between tech giants. As new sensors are incorporated, data privacy and regulation remain ongoing concerns as these devices become central hubs of personal wellness information. Both types of devices reviewed here represent important advancements in digital health and personalized, preventative care through constant, 24/7 monitoring of key indicators. As technology improves further and costs decrease, their potential to positively transform global health is vast.

CAN YOU PROVIDE MORE INFORMATION ON HOW CONTINUOUS AUDITING CAN ENHANCE CONTROL MONITORING?

Continuous auditing is an approach to auditing and control monitoring that utilizes ongoing and simultaneous evaluation methods to provide near real-time assurance. Compared to traditional periodic auditing approaches, continuous auditing provides several advantages that can greatly enhance an organization’s internal control monitoring capabilities.

One of the primary ways continuous auditing enhances control monitoring is through its ability to identify control deficiencies and exceptions on a much timelier basis. With continuous auditing, transactions and activities are evaluated as they occur which allows issues to be flagged much faster as opposed to waiting until the end of a period for a periodic review. Near real-time issue identification means risks can be addressed and remediated promptly before they have an opportunity to propagate or result in larger control problems. The timeliness of issue detection significantly improves an organization’s control responsiveness.

Continuous auditing also enhances control monitoring by facilitating a more systemic and preventative control approach. As anomalies are identified through ongoing evaluations, the root causes behind control gaps can be examined. This makes it possible for controls to be adjusted or additional controls implemented to prevent similar issues from reoccurring in the future. Systemic corrective actions strengthen the overall control framework and shift it from a reactive to proactive orientation. The preventative aspect of continuous auditing optimizes control effectiveness over the long run.

The deeper level of control monitoring that continuous auditing enables also supports improved risk assessment capabilities. As patterns and trends in control data are analyzed over extended periods, new insights into organizational risks can emerge. Areas previously not recognized as high risk may become apparent. These enhanced risk identification abilities allow control activities to be better targeted towards the most mission critical or financially material exposures. The quality and relevance of risk information is increased through continuous auditing approaches.

The pervasive control monitoring that continuous auditing facilitates also helps reinforce a strong control culture across an organization. The awareness that controls are subject to ongoing evaluation discourages behaviors aimed at circumventing important processes and policies. It establishes a norm where the consideration of control implications becomes an inherent part of all business activities. The entrenchment of responsible and compliant workplace behaviors strengthens the overall system of internal control as a secondary effect of continuous auditing.

Continuous auditing technologies further enhance control monitoring by automating routine control procedures. Tasks like transaction matching, data validation, and exception reporting can be programmed as automated workflows. This automates time-intensive manual control testing steps, freeing up auditors and control personnel for more valuable higher-level review and analysis activities. It also ensures consistency in control execution as automation removes human variability. Automation powered by continuous auditing improves control effectiveness, quality and efficiency.

The incorporation of advanced analytics into continuous auditing brings additional enhancements to control monitoring. Techniques like visualization of control results, predictive modeling of deviations, and monitoring of lead and lag control metrics all augment the traditional transaction-focused tests. They add value through new types of insights into emerging issues, causal relationships and forward-looking indicators of future risks to controls. The integration of cutting-edge analytical capabilities into the auditing approach deepens understanding of the internal control environment.

Continuous auditing revolutionizes control monitoring by making evaluations ongoing, systemic and data-driven. Its hallmarks of real-time monitoring, preventative orientation, risk-focus, strengthened culture, automation and advanced analytics transform the approach from a periodic checklist process to a dynamic, intelligence-based one. When fully leveraged, continuous auditing establishes internal control as a strategic management system rather than passive requirement. It maximizes the value proposition of controls for modern organizations and the challenging business conditions they face. Continuous auditing represents the foremost means currently available to elevate the effectiveness, agility and intelligence of internal control monitoring activities.