New York (CNN Busines) America's top supermarkets are facing a new challenge: Grocery aisles in stores aren't suited to meet the growing demand for online orders.

So Walmart, Albertsons, Stop & Shop, Meijer, Hy-Vee and others are building automated mini-warehouses inside their stores and opening up "dark stores" — locations that look like supermarkets but are closed to customers — to make deliveries and prepare pickup orders.

Although only around 5% of US shoppers buy their groceries online today, analysts expect that number to rise in the coming years.

Walmart has trained more than 30,000 workers to fulfill customers' online grocery orders, but in some cases that has led to congested aisles with workers in its own stores during peak shopping times, such as weekends.

Stop & Shop has an approximately 40,000-square-foot dark store in Whitman, Massachusetts, on the site of a former grocery store tailored to make deliveries.

Walmart US chief Greg Foran earlier this year said an executive complained to him, "'I hate shopping in the store on Sunday trying to get up and down the aisles.'"

For grocers that partner with third-party services, often "there are as many people selecting for Instacart as there are customers," said Bill Bishop, co-founder of retail and grocery consulting firm Brick Meets Click.

Grocery store margins are tight. And workers manually picking, bagging and delivering is expensive for grocers. That's why grocers are looking to technology to reduce costs and keep aisles from jamming up.

'Micro-fulfillment centers'

Albertsons and Stop & Shop are testing automated "micro-fulfillment centers" in the backs of their own stores that are dedicated to fulfilling deliveries and pickups. At two stores, Albertsons is using robots to prepare customers' orders, which it says speeds up the picking process.

Stop & Shop, owned by Dutch parent Ahold Delhaize, is building a 12,000-square-foot fully automated fulfillment center in the backroom of a store in Windsor, Connecticut, for deliveries in the Hartford area. Stop & Shop offers delivery through its online Peapod service.

Meijer announced this month that it will also begin testing micro-fulfillment with a logistics company to "maximize space in our stores" and expand online options, said Sid Handa, the company's director of strategic supply chain initiatives.

And in Salem, New Hampshire, Walmart is piloting a system with autonomous carts that gather customers' grocery orders and bring them to Walmart workers, who then prepare them for delivery or pickup.

Some analysts say these models are an advantage over large, centralized warehouses, which are often located further away from customers than stores. That's why micro-fulfillment centers can save grocers in delivery costs, according to experts.

"Micro-fulfillment helps retailers solve the labor and last-mile costs conundrum," Christopher Mandeville, analyst at Jefferies, said in a research report earlier this month.

Mandeville estimates that the cost of delivering groceries from central warehouses is usually around two times higher than using micro-fulfillment in stores. Jefferies cut Kroger's stock earlier this month in part because the company has invested in centralized facilities through a deal with Ocado , instead of micro-fulfillment.

Grocers are also moving the picking process out of stores entirely and testing so-called dark stores. Some dark stores have automation, while others are still manned by employees to do all of the picking of goods purchased online, said Mandeville.

"Dark stores in grocery are an emerging trend," said Michael Demko, founder of grocery consulting firm Locai Solutions.

Walmart recently opened Walmart Pickup Point , a 40,000-square-foot prototype outside of Chicago at a former Dominick's grocery store. Customers drive up to the site to designated parking spots, and a Walmart worker loads up their trunk with their order. Walmart can also make deliveries from the location.

The inside of the location looks like a Walmart with groceries and everyday items. Unlike a traditional Walmart supercenter, however, customers won't be able go inside.

Stop & Shop has an approximately 40,000-square-foot dark store in Whitman, Massachusetts, on the site of a former grocery store tailored to make deliveries.

And Hy-Vee, based in Iowa, is testing four dark stores. The inside looks similar to a store but without signs, according to a spokesperson for the company.

The locations are designed to fill shoppers' online orders while allowing traditional stores to "continue to serve the needs of those who enjoy the in-store experience," the Hy-Vee spokesperson said.

Correction: An earlier version of this story misstated the size of Stop & Shop's 'dark store' in Massachusetts.