Skip to content

Purpose

What is PhoenixMock?

PhoenixMock is a toolkit designed to manipulate and analyze mock files, which simulate client/server interactions (such as socket communications) within the Phoenix ecosystem. It is especially useful for testing and validating Phoenix-based applications.

Key Features

  • Inspect mock files: Retrieve information such as the number of messages in a mock file.
  • Split mock files: Divide a large mock file into several smaller parts.
  • Merge mock files: Combine multiple mock files into a single file.
  • Restore corrupted mocks: Attempt to recover data from broken or corrupted mock files.

Quick start

PhoenixMock provides programs to manipulate mocks data to mimic any kinds of client/server interactions such as sockets for example.

  • phoenix_mock_info : gives information about the mock file itself (number of messages)
  • phoenix_mock_split : splits mock file into several smaller files
  • phoenix_mock_merge : merges several mock file into one bigger file
  • phoenix_mock_restore : restores broken mock file inplace (which could be created by PhoenixSocket::PMockBackendFile and if the program is crashing, mocks can be restore that way)