Date: 201901
Local time of day: 0601-1200
Location: ZZZ.Airport, US
Flight conditions: VMC
Light: Daylight
Aircraft: Regional Jet 900 (CRJ900)
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Test Flight / Demonstration
Flight phase: Cruise
Airspace: Class E ZZZ
ATC / advisory: TRACON ZZZ
Aircraft component: Flap Control (Trailing & Leading Edge)
Component problem: Malfunctioning
Reporter organization: Air Carrier
Reporter function: Pilot Flying; Captain
Reporter qualification: Flight Crew Multiengine; Flight Crew Instrument; Flight Crew Air Transport Pilot (ATP)
Anomaly: Aircraft Equipment Problem Critical; Deviation / Discrepancy - Procedural Published Material / Policy
Detector: Person Flight Crew
When detected: In-flight
Result: Air Traffic Control Provided Assistance; Flight Crew Landed in Emergency Condition; Flight Crew Returned To Departure Airport
Contributing factors: Aircraft; Procedure
Primary problem: Aircraft

Narrative: Both myself PIC and First Officer (FO) were assigned to fly maintenance flight for an ADG test. On this test flight; [a] mechanic was riding along in the Jumpseat and would be conducting the Air Driven Generator (ADG) test. We had one extra mechanic riding in the back who would be observing the ADG test. After completing the first flight checks of the day and briefing what was expected to happen for the ADG test; we prepared as normal on the ground. I would be the flying pilot for the flight; while FO would be completing the checks with [the Mechanic]. We were filed to depart to the North on the SID and from that route planned to go northwest to the ADG test at an altitude of 8;000 feet and if possible request a block between 7;000 feet and 9;000 feet. After starting both engines and obtaining our taxi clearance; we taxied to and held short of Runway 8.  We held short of the runway for about 8 minutes before being cleared for departure. On departure; after being handed off from the control tower to departure we were given an initial altitude of 9;000 feet. The FO requested to stay at 8;000 feet and also asked if we could go northwest. We were denied the direction of flight; but given 8;000 feet and then given a southerly heading and sent over to the next frequency. On this frequency; the controller then asked what our request was and had the company coordinated this and why we had filed a SID. FO informed the controller we wanted to stay at 8;000 feet and that we would like to maneuver to do some maintenance tests. The controller then informed us both areas we requested were full of traffic and that he would give us radar vectors to fly to a fixed point to hold. After being given the instructions to hold; the controller then asked if we were familiar with the restricted area along with active MOAs; to which FO informed him we were not familiar. The controller then asked what wanted to do exactly. I then informed him we were open to take any airspace that was free and would allow us to maneuver as necessary. He then gave us radar vectors to go southeast; were we could expect for him to give us holding instructions. After setting up on an assigned heading and configuring the airplane as necessary for the ADG test; FO and [the mechanic] began the test as I maintained control of the aircraft; operated radios; and maintained collision avoidance. As the checks were being completed; near the completion of test; the FLAPS FAIL caution message was still displayed. FO then informed me that the flaps had failed at the 27 and 28 degree segment. I then asked [the mechanic] was this normal to stay displayed since many other caution and warning messages had just been displayed while they were running the test. He informed me that this was not normal. I asked FO to the run the QRH for flaps fail. As FO ran the QRH; we were still being vectored for the initial maneuver for the ADG test. Since there was a significant amount of drag due to both the flaps and landing gear being extended (which we were told by [the mechanic] the landing gear would remain down through the flight) and we had burning at the lower altitude getting back to the airport was priority.I informed ATC we were identifying as an emergency for a flap failure and requested the longest runway available. We were then vectored on a heading towards the airport. FO completed the QRH; did the normal checklist; and briefed the approach for Runway 8. We were vectored to final approach for 8 and landed without incident. After back at the maintenance hangar; the lead confirmed that the plane had the flaps fail a day prior while conducting the ADG test.Suggestions: Suggestion for future flights is having dispatch file the maintenance flights as a local flight and not for FL320 to a specific fix. After the departure it took a while to get to an area where we could maneuver; which initially was frustrating since the FO and myself had already brief the area we planned to head. Although as pilots we are trained to think and make an informed decision; the frustration could have been avoided. As for the flap failure; the aircraft has been written up the day before; so being briefed that it could happen again would have been appreciated. Finally; having the mechanic who is doing the ADG test or whatever test may be done brief the crew as to what exactly the test is and what is expected to happen would be appreciated. The only information we had was that it was an ADG test and we would go through the steps as we got to them.




Synopsis: CRJ-900 Captain reported they experienced flaps failure while conducting a maintenance test flight.