From my limited understanding, pcap is a packet capture file. running the ping test is not capturing the packets, it is only testing L3 connectivity. You would need to to capture the packets using tcpdump or mirror the packets to an interface/vlan that has a packet capture device connected.
>monitor traffic write-file pk.pcap interface ge-0/0/x
>monitor traffic read-file pk.pcap
these commands are hidden for a purpose so that users who do not understand the impact don't just accidentally leave them to fill up the disk space on th eJuniper device; so the commands have to be completely typed out.
The you run the ping test, from another connection to the box or if pinging from a remote device.
Or you could drop to the shell and run the tcpdump directly. How you proceed with this one is beyond the scope of what help I can offer. I would leave that to those who are knowledgeable about unix shell and know what they are doing and I would not happen to fall into that category of users.