add export command and export test

add export command and export test