After you push red buttons and contain some pellets, you reach Test Chamber 16.
Live Fire Course
There are small, immobile turrets in this room that will shoot at you if they see you. To defeat these turrets, all you need to do is make them fall over. This can be done by making them fall through a portal, or dropping something on them and making them tip over. You can even pick them up from behind, lift them, and drop them, and they might tip over.
However, when they fall, they shoot a bunch of bullets for a few seconds before deactivating, so you should keep your distance when making one fall over.
An active turret that sees you will shoot at you with a rapid fire weapon until it loses sight of you. Getting shot won't kill you instantly, so if you do get shot but manage to get to safety quickly, you'll recover your health and survive. But if you get hit a lot in a short amount of time, then you will die.
Disable the Turrets
As you enter the test chamber, there will be a turret with its back to you. The easiest way to get rid of it is to make a portal under it and then a portal of the other color on a wall or the ceiling. It will shoot a lot of bullets and then shut off.
After you go through the hallway, you will see a laser beam coming through the doorway ahead and hitting the wall. Make sure not to walk into the path of the laser beam. Carefully walk toward the doorway and look through until you see the far wall. Make a portal there, then make a portal of the other color that you can safely walk through without entering the path of the laser. Go through and you will be behind a turret. Disable it by making a portal of the color that you just came through on a distant wall or ceiling, and then a portal of the other color under the turret to disable it (but be careful not to move toward the laser beam nearby).
Look for the next laser beam. You can see some stairs leading up to where that turret is. You can ignore the stairs and make a portal beyond it, then make a portal nearby and walk through it.
To the left, you will see a turret behind a glass wall, and a laser beam shining toward it. Go partway toward the glass until you can see "Help" written on the floor near a couple of cubes behind a piece of wall sticking out. Move the cubes (you will need them soon) and you will discover a crawlspace behind the piece of wall sticking out. You can press the button displayed on-screen to crouch and explore this room further.
When you are done, exit the small room, then carefully look at the ceiling above the turret behind the glass, and you will see an X on the ceiling. Make a portal there, then make a portal some place safe that you can put one of the cubes into. If you positioned the ceiling portal correctly, the cube will fall onto the turret and disable it. If you lose both cubes without disabling the portal, you can try dropping things from the crawlspace, such as the water jug or the cans of beans.
Next, carefully look down the hallway toward where the other laser is coming from. There is another X on the ceiling, so try to quickly shoot a portal on the X. Then make a portal and put the other cube through it to disable the turret.
If you try to get too close to the turret that you just deactivated, a turret in the other room will start shooting at you. Try to quickly shoot a portal on the wall behind the two turrets in that room, then make a portal that you can walk through. Carefully pick up one of the turrets and knock over the other one, then try to drop the turret that you are carrying and go back through the nearby portal to avoid getting hit by the bullets.
There are two doors in this room, one that leads to a room with a stack of cubes, and the other that leads to a room with several turrets. Carefully look through the doorway to see another X on the ceiling. Make a portal on that X and run away, then make a portal of the other color where you can put a cube through it, which will fall onto the turret to disable it.
The next turret near the big red button is facing away, so sneak up to it to pick it up and drop it to disable it.
The final turret guarding the big red button has an X above it on the ceiling, so carefully make a portal on that X, make a portal of the other color, and put a cube through that portal to drop it on the turret and disable it.
Before you put a cube onto the red button, make sure that you are not in front of the door. When the door opens, a laser will shine through it. Peek through the door and make a portal on the wall behind the turret there, then make a portal of the other color and go through it, then knock over the turret to disable it.
In the room with the mesh walls, you see another turret facing away from you. Make a portal on the wall or ceiling behind the turret, then a portal of the other color that you can go through to end up behind the turret, where you can pick it up to disable it.
From there, you can go into the elevator to Test Chamber 17.