Why our Series B raise will be good for our industry, too

**Ideon is the company formerly known as Vericred. Vericred began operating as Ideon on May 18, 2022.**

By Michael Levin, Co-founder and CEO, Vericred

A lot runs through your mind when you complete a Series B round of funding totaling $22.7 million. 

Two obvious feelings, for sure: pride and humility. 

Pride, because the round, which was oversubscribed, took less than three months—half the time we expected—and included monetary votes of confidence from four new investors (Aquiline Technology Growth, Echo Health Ventures, MassMutual Ventures, and Guardian Strategic Ventures) as well as three existing ones (Riverside Acceleration Capital, First Health Capital Partners, and FCA Venture Partners). It’s the ideal mix of strategic and venture capital partners. If we’re to be judged by the company we keep, we like our chances.

Humility, because we learned a lot about business and our industry from the fundraising process, even from those investors who passed on this round. There’s nothing like having dozens of microscopes focused on you, each with its own lens through which to view your decisions and theories. Humility also because we now feel even more pressure to keep delivering on our accumulating successes and evolving promise. We’ll use this new capital to expand our operational teams in New York City and Omaha, and to beef up our marketing and sales functions throughout the country. We don’t take a dollar of revenue—existing or new—for granted. 

But, if I’m leveling with you, what I’m also feeling right now is optimism and impatience. 

Optimism, because the vision that’s driven us from the beginning continues to prove its merit, producing real accomplishments and genuine approbation from stakeholders that matter. 

We are, all of us at Vericred, unapologetic benefit geeks who love a good API. And we started our infrastructure-as-a-service platform because we knew that the health insurance and benefits industry was about to enter a new phase of digital transformation, an inevitable evolution driven by a need for the operational efficiencies that would be necessary to improve member experiences and product innovation. 

Today, thanks to our talented team, Vericred offers a full suite of APIs across medical, life, dental, vision and other lines of coverage that power quoting, enrollment, member management, and renewals on multi-carrier InsurTech and BenTech platforms.  Our goals were to simplify the complex process of exchanging data among multiple partners—and set a standard for the industry. That’s what we’ve done, and that’s what we’ll continue to do. 

One measure of Vericred’s impact on the industry is the more than 300 carriers and 100+ tech companies (and counting) that have joined our platform, a roster of heavyweights and forward thinkers that includes Cigna, Guardian, Humana, MetLife, Principal, Kaiser, Rippling, Gusto, Ease, and Namely. This momentum, along with the strategic investment participation by industry leading carriers, reflects the inevitability of what’s coming as much as it does the excellence of our execution.

But our determination to grow the community of partners on our platform is not driven solely by the desire to generate returns for investors or to bring order to a far-too-siloed business. We have always been a little (maybe a lot) obsessed with the benefits ecosystems because we believe our industry—and our industry’s ability to serve individuals and organizations—is enhanced when we are all connected, when we are speaking the same language directly to each other in the smoothest possible “dialogue.” 

When I talk about connecting I’m not just referring to the efficient transmission and translation of data that Vericred is helping to simplify. I’m referring to real-life connections between actual humans—data scientists, C-suite execs, tech mavens, operations leaders, marketing pros—across companies and sectors of the industry. 

That’s really why I’m also a little impatient after this just-completed raise. I want to make that happen, sooner than later. Which is why some of the funds will be used to launch a series of initiatives that we believe will go a long way toward building the kind of community that a healthy industry needs, one in which the transfer of knowledge is not only API to API or system to system but also person to person. 

I’ll expand on the details of Vericred’s “connectivity agenda” in the coming weeks and months, but for now I’ll just say that we believe the people in every precinct of our expanding and evolving ecosystem—carriers, technology companies, regulators, researchers—need a new way of communicating and exchanging ideas. Just as we’ve made good on the promises we’ve made so far about standardizing health insurance and benefits data, we’re equally committed to accountability when it comes to unifying our more-in-common-than-not communities.

The Top Five Questions Carriers Ask About ICHRA

New to ICHRAs? Download our primer for health insurance executives.

Individual Coverage Health Reimbursement Arrangements (ICHRAs) burst onto the employee benefits scene on Jan. 1, 2020, spawning a new paradigm in group health insurance that shifts the plan shopping and administration responsibility from employer to employee. Now, more than one year into ICHRA’s arrival, insurance carriers are increasingly interested in capitalizing on ICHRA.

To that end, Ideon recently hosted two webinars aimed at helping health insurers in both the group and individual markets understand how they, too, can join the ICHRA revolution. While most carriers are aware of ICHRA’s existence and the legislation behind it, we found that there are still several topics on which carriers have critical questions. In this blog post, we’re sharing, and answering, the most common questions we heard during our webinars.

Is ICHRA adoption among small groups more prevalent in certain geographic areas?
Yes, ICHRA adoption varies by state, and even by county. ICHRAs work best in areas with robust individual markets, affordable plans from name-brand carriers, network options similar to what employees find in the group market, and competitive pricing between individual premiums and their group-plan equivalents. Where’s the next ICHRA hot spot? Check out our interactive map to find rate-favorable states for small groups to shift to ICHRAs.

If the contribution is deemed unaffordable for the employee, can they go to the ACA exchange and receive a subsidy?
A key facet of ICHRAs is affordability. Specifically, large employers (typically those with 50 or more employees) must offer an “affordable” ICHRA or face penalties. Small employers, on the other hand, can offer either an affordable ICHRA or an “unaffordable” version. According to ICHRA legislation, an employer contribution is “affordable” if the remaining amount an employee has to pay for a self-only silver plan on the Exchange is less than 9.83% of the employee’s household income.

The ability to offer an unaffordable ICHRA is an opportunity for small employers. When a small-group ICHRA is “affordable,” employees are not eligible for government subsidies. If small employers offer “unaffordable” ICHRAs, employees can “opt out” and go to the exchange to get their premium tax credit, more commonly known as a subsidy.

How do you address the fact that individual plans do not generally have the same broad networks as group plans do?
One of the benefits of an ICHRA is that employees now have the expanded choice associated with the individual market, where they have more opportunity to find a carrier, plan, and network in which their preferred doctors and providers participate. Provider-centric plan shopping is an essential part of the employee decision process: about 70 percent of consumers, according to Ideon’s internal data, add their doctors as search criteria. When transitioning an employee to an ICHRA, it’s not necessarily about finding the broadest network, it’s about selecting the plan and network that best meets each individual’s needs.

How will ICHRA impact the role of the broker?
Group brokers have a critical role in the ICHRA process, from helping employers evaluate whether ICHRA is the best option for their company, to guiding employees through the individual plan shopping experience. Their role as essential advisors, trusted and valued for their industry expertise, will not change with ICHRA.  

Smaller groups already struggle to understand benefits. Are there tools to help them do the calculations around tax credits and ICHRA affordability?
Yes. Several digital platforms and exchanges have built innovative tools to help employers, brokers, and employees determine whether ICHRA is right for them. From digital affordability calculators to instant subsidy estimates, tech-driven decision-support tools are simplifying the decision process in year two of ICHRA. As an example, our partners Flyte HCM, Gravie, Savvy, and Take Command Health are platforms with ICHRA functionality.

Contact us to learn how Ideon helps carriers navigate the shift toward ICHRAs and provides access to new distribution channels via one central connection.

The Effect of Increased Competition on Premium Changes in the Individual ACA Market

Veristat: A Data-Driven Look at Today’s Insurance Markets

During the early years of the ACA individual plan, premiums rose steadily and often steeply, not least because of carriers’ decisions to exit various markets. But now that uncertainty has receded and the risk pool is better understood, carriers are changing course. Bright, Oscar, Centene (Ambetter) and Cigna have all aggressively expanded their footprints, and in 2021 UHC re-entered the individual market in five states.  

To evaluate the impact of this increased competition we looked at premium changes in individual ACA plans over a three-year period, from plan year 2019 to plan year 2021.  

Over that time, state-average, lowest-cost Bronze plan premiums fell in real dollar terms in 94% of states with increased competition (from new entrants), compared with 54% of states without such an increase. State-average, lowest-cost Silver plan premiums fell in 88% of states with increased competition, compared with 54% of states without. And state-average, lowest-cost Gold plan premiums fell in 81% of states with increased competition, compared with 60% of states without. In all, 16 states welcomed new entrants or increased competition; of these, only Louisiana failed to realize real-dollar reductions in Bronze plans over the past three years.

Premiums dropped in the nation as a whole during the same period—with or without increased competition. The nationwide average of each state’s average lowest-cost Bronze plan dropped by 9.4% in states where competition increased, and by 2.7% in those where it didn’t. Similarly, the nationwide average of each state’s average lowest-cost Silver plan dropped by 12% in states where competition increased, and by 5.2% in those where it didn’t. And the nationwide average of each state’s average lowest-cost Gold plan dropped by 25% in states where competition increased, and by 6% in those where it didn’t. 

In short, the news is good. Not only is increased competition expanding consumer choice. It’s accelerating a decrease in individual premiums, too.

Vericred Analytics: Rate Favorable States for Small Groups to Shift to ICHRAs

**Ideon is the company formerly known as Vericred. Vericred began operating as Ideon on May 18, 2022.**

ICHRAs are the hottest topic in employer-sponsored healthcare. We at Vericred are tracking a number of plan attributes that could accelerate or retard this shift from small group coverage to the individual market. Here, we look at one of them: premium changes between 2020 and 2021.

In 2021, there are five new states (Maryland, Maine, Mississippi, New Hampshire and Washington) where individual plan premiums are equal to or less expensive than small group premiums. Interestingly, increased competition was not the driver of these lower individual premiums: only one of the states, Maryland, welcomed a new carrier to its individual market. (Note: Two states—New Jersey and North Dakota—saw small group premiums become less expensive than individual plan premiums.)

In aggregate, the average (across all of a state’s counties) lowest-cost Bronze individual plan premium was equal to or lower than the small group equivalent in 19 states; that’s up from 16 in 2020 and 11 in 2019. The average lowest-cost Silver individual plan premium was equal to or lower than the small group equivalent in 13 states, up from 11 in 2020 and six in 2019. And, the average lowest-cost Gold individual plan premium was equal to or lower than the small group equivalent in 12 states, up from seven in 2020 and five in 2019. Overall, the number of ICHRA premium-friendly states has roughly doubled over the past two years.

Click here to view an interactive version of this map.

More broadly, the disparity between small group and individual rates has attenuated over the same period. In 2021, the average Bronze plan premium differential between individual and small group markets across all states is down to just 10%, from 15% in 2020 and 25% in 2019. Similarly, the average Silver plan premium differential is down to 23%, from 28% in 2020 and 42% in 2019. And, the average Gold plan premium differential is down to 25%, from 32% in 2020 and 45% in 2019.

Since the launch of the ACA, much has been made about the annual rate increases, particularly in the individual market. More recently, though, the opposite appears to be the case. From 2019 to 2021, state-average individual plan premiums actually went down in real dollar terms in two thirds (67%) of the country. Small group rates, on the other hand, fell in only 12-20% of the states, depending on metal level. The data has spoken: Individual rates are falling.

Lightening up the year-end blackout period for employee benefits

Ideon ends the hassle of changing current-year plan details during open enrollment.


By Dan Langevin, co-founder and chief technology officer of Ideon

Towards the end of every fall, as 1/1 renewal dates loom, insurance carriers, brokers and members work diligently to ensure that upcoming plan elections go off without a hitch. Meanwhile, life goes on in the current plan year, and life events that affect enrollment need to be addressed. Simultaneously managing the current plan year changes and the upcoming elections is often a tricky ordeal.

The fact is, most carrier systems struggle to manage coverage across plan years—regardless of the carrier’s backend data ingestion system (EDI 834, API or a custom format). When you consider that enrollment elections for the next plan year begin at least a month before the effective date and that changes can continue to be made retroactively for 60 days, cross-plan-year changes can actually be a problem for three months a year.

To this point, the “state of the art” solution has been manual one-off processes. Carriers require specialized, custom formats (different from their regular EDI 834, API requests or flat files) or specially timed delivery of changes for the prior plan year that differs from the regular file delivery day. In practice, most brokers and operations teams at BenAdmin platforms handle these changes manually, by contacting the carrier or by entering the data into the carrier’s portal. This isn’t exactly ideal. Nor is it ideal for the carriers, as their cost-saving automation is bogged down by so many extra manual touches.

This is a major systemic shortcoming. How can we realize full digital connectivity if for 25% of the year we require a separate manual process to handle basic changes?

Eventually, the underlying limitation will be resolved. Carriers will upgrade their internal systems, data models and processes to seamlessly handle cross-plan-year changes. But, as with many things technology-related at large national carriers, the investment required to accomplish that will be large and the timeline long. The market wants a solution today.

Enter Ideon’s Blackout Period Change Management. We have worked diligently with our carrier partners to develop cross-plan-year, change-management processes that eliminate the need for one-off manual changes. The result: the effective elimination of Blackout Periods.

From the BenTech platform or broker’s perspective, data is sent to Ideon’s APIs per standard operating procedure. Our data model has the concept of different plan years baked in. The differences between how transactions are handled with each carrier are entirely transparent. It “just works.”

From the carrier’s perspective, cross-plan-year changes remain less than ideal. Most carriers need to do some level of system acrobatics to process them. That can mean tasks as manual as employees processing a custom Excel doc with every requested change. That said, knowing that they are getting clean data in a consistent format from multiple BenTech platforms gives them back some of the leverage they reap from automation the other nine months of the year. Further, as the carrier upgrades the efficiency of their internal systems (to standard file feeds or, ultimately, to APIs), it will have a partner who understands the idiosyncrasies of cross-plan-year changes and can help to develop a technical integration and business process.

This fall, we piloted our Blackout Period Change Management process with a large customer that covered tens of thousands of lives across hundreds of groups and four carrier partners. The feedback from all sides was extremely positive. That success has made us that much more excited for a broad rollout across all of our carrier and BenTech partners.

Ideon’s mission is to make insurance and employee-benefit data flow freely between member-facing tech platforms and insurance companies. We know that APIs will be a big part of that solution. In the short term, though, we will also provide innovative, tech-enabled business processes that bridge the gap between where we think we should be and the realities of what exists in the ecosystem today. 

Contact us to learn more!

Eight Reasons ICHRAs May Transform Employer-Sponsored Health Insurance

Predictable employer costs and coverage transportability are just the tip of the iceberg.

Change is afoot in the insurance world. Rules enacted in 2019 spawned a new iteration of employer-sponsored health insurance: Individual Coverage Health Reimbursement Arrangements (ICHRAs).

You can think of ICHRAs as the health insurance equivalent of 401(k) plans (which transformed employer-sponsored retirement savings). That is to say, with this new offering employers can reimburse employees for their insurance costs rather than purchasing policies for them.

The process typically looks like this: 1. An employer designs an ICHRA, with a range of options tailored to meet its needs and those of its employees; 2. employees choose a plan; and 3. employees submit paid expenses to employers for reimbursement. (Expenses might include premiums, claims or both, depending on the design of the ICHRA.)

Whether the shift toward ICHRAs will be as tectonic as the shift to 401(k)s remains to be seen. But there are many reasons to think it might. From an employer’s perspective, the main benefits of ICHRAs include:

  • Reduced and predictable costs: ICHRAs allow employers to set a reimbursement rate that means they never have to pay more.
  • No minimum participation rates: Fully insured plans often require 50% or 75% participation; ICHRAs do not.
  • Less onerous benefit administration: ICHRAs shift the burden of managing benefits to the employee.
  • Something rather than nothing: Some small employers would like to contribute to employees’ health insurance costs but can’t afford traditional fully insured plans. ICHRAs provide a way to provide some help.
  • Different solutions for different classes: ICHRAs allow an employer to move certain classes of employees into the individual market. This may allow the employer to provide coverage, or better coverage, to certain classes.

Likewise, employees will find a lot to like about ICHRAs, such as:

  • Choice: A healthy, single 25 year old has different needs than a 45 year old with children or someone with a chronic condition. ICHRAs give employees the choice of tens, or even hundreds, of health plans, allowing them to find one that best matches their needs.
  • Transportability: ICHRAs make it possible for individuals to leave an employer and still keep their plan. The more ubiquitous ICHRAs become, the more likely it will be that an employee could keep their plan over time.
  • Broader range of covered costs: ICHRAs can be used to pay for certain approved medical expenses in addition to premiums.

Of course, the extent to which ICHRAs become the common currency of employer-sponsored health insurance will dictate their effect on carriers, brokers, insurtech operators and other interested stakeholders.

For a deeper dive into the subject—including potential obstacles to widespread ICHRA adoption—download our latest Ideon Report: The ICHRA Revolution—A New Model for Employer-Sponsored Health Insurance

Covid is forcing a reckoning for the health insurance industry—and that’s good

By Michael Levin
Co-founder and CEO, Ideon

The Covid-19 pandemic is a once-in-a-lifetime stress test of the healthcare system. And while most of the attention has rightly been focused on front-line healthcare delivery, the provision of employer-sponsored health insurance has also been substantially disrupted. Those carriers, brokers, and employers who respond with speed, creativity and flexibility will emerge from this crisis with more modern, efficient, and resilient systems than ever before. Those who don’t, I believe, will regret their failure to seize the moment.

Until Covid, a great deal of the health insurance sales cycle has involved face-to-face contact. Brokers met with employers, often using paper presentations to compare various options. Then, in open enrollment, many employees would explore their options by meeting in a cafeteria or conference room with carrier or broker reps. A lot of administrative details were still processed through paper forms.

Today, much of this interaction has gone digital, via video calls, webinars, micro sites, and apps. For some clients, this forced transition has meant a loss of intimacy and trust. But in general, those people who had been reluctant technology users have discovered the speed and convenience of online interaction. 

At the same time, the pandemic has spurred some in the industry to modernize anachronistic practices. For example, some carriers have scrambled to figure out how to accept credit cards, as some business clients were no longer working in offices where they could easily cut checks.

We can expect a good deal of this behavior to continue and even expand after the pandemic subsides, further reducing costs and improving service quality throughout the industry. 

But there are also more subtle changes that accompany these shifts from in-person to online interaction. To serve employers remotely, brokers are now providing access to online marketplace tools that allow such customers to compare plans  and rates  from multiple carriers. 

To be sure, many insurance companies have long been ambivalent about the rise of new technology-driven,  multi-carrier, distribution platforms. They would prefer to have direct interaction with brokers and clients, if not through their sales force than at least through proprietary online systems. Being just one item on a menu of carriers, they fear, neutralizes their differentiation, and focuses competition on price. Now, though, the market has been refocused by COVID, with brokers and employers alike demanding the transparency and efficiency of these platforms. As such, carriers are increasingly open to partnering with InsureTech companies.  

Carriers have faced similar choices about how to inform customers of expanding coverage for telemedicine and testing, relaxed policy rules, and other changes in response with Covid. Some have largely restricted this information to their own sites and apps, offering a rich stream of communication to the tiny fraction of their customers who use those channels. But others have partnered with brokers and technology companies to distribute their content—finding that what they lose in control is more than matched by gains in reach. 

This dilemma is neither new nor exclusive to the insurance industry. Airlines would rather sell tickets on their own sites than through Expedia. Banks would prefer you check your balance on their app, not Mint. But these companies have come to understand that they need to do business in the ways their customers want. 

The insurance industry must continue to absorb this lesson. And I believe it will. Indeed, if the new Covid vaccines are as effective as initial reports suggest, I suspect that a year from now we will start to see a significant restructuring of the health insurance industry. 

Because there’s no going back.

That is, a lot of customer behavior will already have permanently changed. Fewer people will work from offices, limiting the revival of face-to-face sales calls and common-area recruitment sessions. And many of even the most resistant to new technology will have learned to use digital tools for buying and managing their health insurance. Nobody will want to go back to filling out paper forms.

Most significantly, employers and plan participants will think back and remember how well—or how poorly—they were treated by their insurance companies. 

Were they able to get information and handle transactions easily and efficiently? 

Which companies responded creatively and with flexibility to the rapidly changing world—and which were stuck in an irrelevant past?

It’s a stress test for the entire industry. Not all will pass, but those that do will ultimately be grateful for the reckoning brought on by an otherwise awful pandemic.

How we migrated a 1TB database from Heroku to AWS Aurora with (almost) no downtime

**Ideon is the company formerly known as Vericred. Vericred began operating as Ideon on May 18, 2022.**

Earlier this year we decided that we wanted to move our PostgreSQL database for the Vericred API from Heroku to AWS Amazon Aurora. Aurora offers higher performance, better scaling options, and more flexibility at a lower cost while still being fully managed. Aurora is also PostgreSQL compatible, so the change appeared seamless to our API and our engineers. With the help of Heroku’s Data Solution Architecture team we were able to accomplish the migration, and additionally upgrade from Postgres 9.6 to 11.6 with just a few minutes of cumulative downtime.

We decided to perform the upgrade from Postgres 9.6 to 11.6 before migrating to Aurora. We wanted to keep the number of things changing at once to a minimum and figured a major version upgrade a couple of weeks before the migration would give us ample time to iron out any issues, of which there were none. The process for upgrading the major version of PostgreSQL in Heroku was straight-forward: we brought up a follower database, waited for it to catch up to the primary database, upgraded the follower, put Vericred API into read-only mode, promoted the follower database to be the primary, and exited read-only mode. We performed the migration overnight when there was minimal activity on the API. The API was unavailable for less than five minutes while the follower was promoted to the primary database and the Heroku dynos were recycled.

On a high level, the process for migrating from Heroku to AWS Amazon Aurora was similar to upgrading major versions within Heroku: Create a new database to follow the one you want to migrate, put your API into read-only mode so the follower catches up with any new commits, promote the follower, exit read-only mode, go about your day. But there were a couple of issues that complicated matters. Heroku uses AWS hardware, but their AWS account owns the database instance, not Vericred’s. And Heroku couldn’t just give us carte blanche access to the instance. The other issue was you can’t configure an Aurora instance to follow a non-Aurora instance, you have to use something like logical replication or AWS Data Migration Service to get the data into Aurora.

To solve the first problem, that we didn’t have full control over the source database in AWS, we needed the help of Heroku’s Data Solution Architecture team. They setup a secure S3 bucket with a recent backup of our database and up-to-date WAL files. In our AWS account we setup an EC2 instance and installed PostgreSQL and a tool called Wal-E. Wal-E is a program that allows you to setup continuous archiving via a base backup and WAL files. The Wal-E documentation was great and setting up continuous archiving was fairly simple. It took several hours for Wal-E to catch up to the primary database, but when that was done, we had a read-only follower in AWS of our primary database in Heroku. Like with the major version upgrade, we put our API into read-only mode, made the follower our primary database, and recycled our application dynos. Total downtime was less than a minute.

Once the primary database was hosted in our AWS account, we had to get the data into Amazon Aurora. To do this we used AWS Data Migration Service. With DMS you define source and target databases and then define one or several tasks to move tables and rows to the target database. DMS can also validate the data is the same between the source and target after it has been migrated. We needed to migrate approximately 120 tables and they fell into one of four categories each with their own DMS task. The first criteria was whether or not the tables needed to be continuously replicated after migration, which DMS supports. About 90% of our tables get updated due to our API interacting with internal applications at Vericred. We had the luxury of temporarily turning off any services in our API that updated these tables during the migration without impacting our customers. The second consideration was whether or not a table contained a LOB column. LOB columns are types with large binary objects and can include text, JSON, JSONB and BYTEA. DMS can successfully handle LOB columns with large amounts of data using “FULL LOB MODE” but running a task in this mode severely impacts migration performance, so it’s important to segregate tables that require full LOB mode into a separate task. Migrating all the tables took about four hours. The migration of tables with LOB columns consisting of JSONB that could be several megabytes in size took up the majority of that time.

DMS migrates the tables and the data inside them, but it doesn’t migrate indices, primary keys, foreign keys, triggers, or user defined types and functions. After the data migration was complete, we had to reapply all of these by running SQL scripts we prepared ahead of time on the Aurora instance. Running all these scripts took another two and a half hours. After that was complete, we were ready to cutover to Aurora as our primary database. Again, we put the API in read-only mode, turned off continuously replication in DMS, pointed the API at the new database, and recycled the application dynos. This took less than a minute and we were back up and running.

The migration took a fair amount of planning, coordination, and testing by the engineering team, as well as some help from the experts at Heroku. But, all in all it turned out to be less painful than expected to migrate our 1TB database not only from one cloud provider to another, but from one database engine to another with almost no noticeable downtime to our customers.

Using Rust to Speed Up Your Ruby Apps: Part 4 — Testing

**Ideon is the company formerly known as Vericred. Vericred began operating as Ideon on May 18, 2022.**

In the first two blog posts of this series we discussed the why and the how of using Rust to speed up Ruby apps. In part three we took a look at error handling between Ruby and Rust code. Now let’s take a look at testing.

Testing Ruby Code That Calls Rust

There isn’t that much that needs to be said specifically about testing Rust code that is accessed via a Ruby app, especially unit tests. You can unit test your Rust library just like any other Rust application. You can also unit test your Ruby code as you normally would, mocking out the calls to your Rust library.

Integration tests are always a good idea, but even more so when a dynamically typed language is passing objects to a statically typed language via FFI. There are no restrictions on what type an attribute can be on a Ruby object that gets passed into a Rust library. In Rust you will need to know how to handle all the possible types your Ruby code might throw at you. Integration tests should help you catch potential type impedance issues before you start seeing panics in your production logs.

We use RSpec at Vericred as our Ruby testing framework. The only thing that made our Ruby integration tests slightly tricky was the fact that our Rust library inserts rows into our PostgreSQL database. We use the DatabaseCleaner gem to reset our database between tests. By default we use the transaction strategy which encapsulates database inserts as part of a test in a transaction that gets rolled back after the test. This doesn’t play nice when things outside of the ActiveRecord database connection insert data in the database (like a Rust library). The solution for this is straightforward, use the truncation strategy for just the tests that test the integration with our Rust library. This will ensure that data inserted by the Rust library will be present long enough for you to test it in RSpec. Just make sure the database is cleaned after the test. The maintainers of DatabaseCleaner provide a thorough example here.

Writing Tests in Rust

The documentation team at Rust can do a much better job of teaching you how to write tests in Rust than us, but we’ll quickly highlight the basics. A test function is more or less the same as any other function in Rust except the function signature doesn’t define any arguments or return types. A test function will have a #[test] annotation above it and will only be compiled and executed when you run the cargo test command. The assert and assert_eq macros are similar to expectations in RSpec in that they let you assert the code you’re testing returns correct results. Here is a basic example:

fn double_it(x: isize) -> isize {
  isize * 2
}

#[test]
fn double_it_test() {
    let result = double_it(1024);

    assert_eq!(2048, result);
}

 

Simple enough, right? It may not print output to the screen as pretty as RSpec, but it certainly gets the job done.

Mocking in Rust

Now let’s say our double_it function calls another function that we’d like to mock. Implementing a mocking library in a statically typed language like Rust is more complicated than a dynamic language like Ruby. Nevertheless, there are a few crates out there that can help us do the job. We currently use Mocktopus at Vericred. At the time we started implementing our Rust library it was the best option available. Mockall is a newer library that offers more features than Mocktopus and appears to be more actively developed. Be sure to check out both libraries and pick the one best suited for your needs. We’re going to take a look at an example with Mocktopus.

#![cfg_attr(test, feature(proc_macro_hygiene))]

#[cfg(test)]
use mocktopus::macros::*;

fn double_it(x: isize) -> isize {
    doubler(x)
}

#[cfg_attr(test, mockable)]
fn doubler(x: isize) -> isize {
    x * 2
}

#[cfg(test)]
use mocktopus::mocking::*;

#[test]
fn double_it_test() {
    doubler.mock_safe(|_x| {
        MockResult::Return(2048)
    });

    let result = double_it(1024);

    assert_eq!(2048, result);
}

 

In addition to including mocktopus you also have to enable the proc_macro_hygiene feature, which is nightly-only. While Mocktopus requires that you execute your tests using Rust nightly, your actual non-test code can still use stable. In order to mark a function (or entire module, or impl definition) mockable you conditionally set the mockable attribute using cfg_attr. Also, make sure you include mocktopus as a dev-dependency. Taking these steps will ensure that mocks will not be compiled into release builds, which would likely cause performance issues.

Using Mocktopus Across Multiple Targets

It’s not uncommon for a Rust project to include multiple targets. An example of this would be a binary target (or multiple binaries) and a lib target that creates a library imported by the binaries. What if you wanted to mock a call to a function in the library made from the binary? Unfortunately, #[cfg(test)] is not enabled for dependencies, so the above example will not work. But, we can make some simple modifications to achieve the desired effect.

First we need to make Mocktopus an optional dependency on [dependencies] instead of a plain old dependency under [dev-dependencies]. And then we’re going to add a mockable feature. Your Cargo.toml file should change from this:

[dev-dependencies]
mocktopus = "*"

 

to this:

[dependencies]
mocktopus = { version = "*", optional = true }

[features]
mockable = ["mocktopus"]

 

Next we replace the test flag passed to cfg attributes with our mockable feature like this:

#[cfg(any(feature = "mockable", mockable))]
use mocktopus::macros::*;

fn double_it(x: isize) -> isize {
    doubler(x)
}

#[cfg_attr(feature = "mockable", mockable)]
fn doubler(x: isize) -> isize {
    x * 2
}

 

We can enable the mocking feature with a command line flag: cargo +nightly test --features "mockable".

Hopefully, by leveraging Rust’s type system, ownership model and robust testing capabilities, you’ll be able to improve performance and stability of your Ruby apps without introducing a litany of new bugs.

InsurTech and Benefits Platforms Launch Initiatives in Response to COVID-19

As a platform business operating at the intersection of health insurance and technology, our data services support two distinct constituencies: insurance carriers and tech platforms. With COVID-19 disrupting business operations around the world, we’ve decided to check-in on how both groups of stakeholders are responding to these dynamic market conditions. Earlier this month, with an assist from AHIP, we began tracking how U.S. health insurance carriers are confronting the current national health emergency. Likewise, tech platforms in the InsurTech and employee benefits space are combating COVID-19, albeit in their own ways, leveraging their respective platforms to mitigate the outbreak’s impact on their customers.

With initiatives ranging from offering businesses free payroll and expanding telemedicine services, to helping brokers navigate unprecedented new challenges, our partners are developing an ongoing series of innovative solutions.

Here is a list of ways these tech platforms are addressing the challenges brought forth by COVID-19. If you have more information to add, or would like to be included on our list, please contact us.

HealthJoy, a benefits experience platform, announced QuickLaunch in response to the COVID-19 pandemic. The initiative allows companies to deploy telemedicine and concierge support to employees within two business days.

HR and benefits platform Zenefits is offering businesses 12 months of free payroll with an annual subscription to any of the firm’s HR software packages. Zenefits has also published several resources designed to help small and medium sized businesses navigate COVID-19, built a calculator to help employers apply for Payroll Protection Program loans, and added a feature to help employees submit COVID-related leave requests.

San Francisco-based Rippling, an employee management platform, has published a range of content for businesses, with advice on hiring and onboarding remote employees, and uncovering hidden security risks of remote work. Additionally, Rippling offered a free webinar with recommendations on how to onboard employees in the age of COVID-19.

Ease, a digital benefits administration platform serving 1,500+ agencies and 70,000+ employers, is helping brokers digitize their operations and workflows. In response to heightened demand for its BenAdmin and HR solutions, Ease is doubling both training and support to make it easier for brokers to onboard clients remotely.

With an influx of volume related to COVID-19, Teladoc, a virtual care and telehealth platform, has responded by developing FAQ documents to assist confirmed and potential coronavirus patients to receive care remotely.

Small business-focused HR and benefits platform Gusto has created an extensive COVID-19 resources page. In addition to original content, the guide includes financial and relief resources, broken down by federal program and at the state level. Gusto also reduced pricing for new customers and has partnered with lenders to help small businesses apply for the Paycheck Protection Program.

GoCo, an HR, benefits and payroll platform, created a COVID-19 section on its website that offers advice and insights for businesses and HR professionals. The company also launched a new feature to help businesses track leave requests in compliance with the Families First Coronavirus Response Act.

Take Command Health, which provides HRA solutions to employers, launched a roadmap to guide small business owners through a range of Coronavirus-related resources, legislation and relief programs.

Stride Health, an online insurance marketplace for health, dental, vision and life insurance, launched its “Independent Worker’s Guide to COVID-19,” which includes advice and support on tackling health, taxes and financial problems during the Coronavirus crisis. With several states having created Special Enrollment Periods for the uninsured, Stride Health enables users to search for affordable health plans by zip code.

National provider of employee benefits, payroll and HR services, BenefitMall, is offering two separate resources pages: one for its payroll clients and one for brokers. BenefitMall also launched a multi-part webinar series on staying safe and prepared during COVID-19.

AmWINS, an insurance brokerage with products across property, casualty and group benefits, is offering insights on how COVID-19 is transforming the insurance industry, and advice for brokers on how to assist clients during this unprecedented period.

Decisely, a benefits brokerage and HR platform for small businesses, produced for its customers a document on The Families First Coronavirus Response Act, which provides financial aid and other benefits to combat COVID-19 in the U.S.

Applied Systems, provider of cloud-based software for the insurance industry, has built a resources page that includes business continuity guides, technology support and business management recommendations.

Zywave, a technology solutions provider operating across multiple lines of insurance, is offering a COVID-19 resources center to help brokers and their clients confront the COVID-19 pandemic. Zywave’s in-house content team organized the resources into three categories: compliance, HR, and information for employees.

Mercer has created an information hub to help employers and HR professionals mitigate the many challenges emerging from COVID-19.

If you have more information to add, or would like to be included on our list, please contact us.