How to get the request body raw inside test cases in TESTS scripts?

I am trying to get the request body raw inside test cases in TESTS scripts?
Here the script in TESTS:

pm.sendRequest({

url: pm.collectionVariables.get("url") + '/xxxxx/'+ api +'/xxxxxxxxxxx',
method: 'POST',
header: {
    'content-type': 'application/json',
    'application': pm.collectionVariables.get("sha256"),
    'sign': pm.collectionVariables.get("sign")
},
body: {
    mode: 'raw',
    raw: JSON.stringify({
        deviceId: null,
        email: null
    })
}

}, console.log(“Request Body :”, JSON.parse(pm.request.body.raw)),
function (err, res) {
pm.test(“N : All Parameter Null”, function () {
pm.expect(res).to.have.property(‘code’, 200);
pm.expect(res.json()).to.have.property(‘status’, ‘00’);
pm.expect(res.json()).to.have.property(‘message’, ‘Success’);
console.info("All Parameter Null Response Time: " + res.responseTime)
});
})

I’m using console.log(“Request Body :”, JSON.parse(pm.request.body.raw)) to get request body raw, but the content i got is the raw data from BODY (Main Test Cases)

the purpose of this question is to create a signature in the header, based on request body raw that generated with secret key
i have no problem to create signature in BODY (Main Test Cases), the problem only inside TESTS

How can I get the request body from TESTS ?
or anyone experience how to create signature inside TESTS?

If you have a look at the sendRequest() info in the Postman JavaScript reference.

Postman JavaScript reference | Postman Learning Center

You can define the request as its own object, which should give you full access to the body to add or remove whatever you want before you hit the sendRequest. You are in full control of what goes in the body.

// Example with a full-fledged request
const postRequest = {
  url: 'https://postman-echo.com/post',
  method: 'POST',
  header: {
    'Content-Type': 'application/json',
    'X-Foo': 'bar'
  },
  body: {
    mode: 'raw',
    raw: JSON.stringify({ key: 'this is json' })
  }
};

pm.sendRequest(postRequest, (error, response) => {
  console.log(error ? error : response.json());
});