" Error While testing the logicapps the callback url for service bus action is not loaded"

Shunmugam, Sugeshkumar 21 Reputation points
2022-06-01T06:25:25.437+00:00

The 'ListCallbackUrl' is not supported for 'Servicebus send message triggers action "'.

This is my logic apps workflow: { "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "actions": { "Send_message": { "type": "ApiConnection", "inputs": { "host": { "connection": { "referenceName": "servicebus" } }, "method": "post", "body": { "ContentData": "@{base64('success')}" }, "path": "/@{encodeURIComponent(encodeURIComponent('test'))}/messages", "queries": { "systemProperties": "None" } }, "runAfter": {} }, "Response": { "type": "Response", "kind": "http", "inputs": { "statusCode": 200, "body": "success" }, "runAfter": { "Send_message": [ "Succeeded" ] } } }, "triggers": { "manual": { "type": "Request", "kind": "Http", "inputs": {} } }, "contentVersion": "1.0.0.0", "outputs": {} }, "kind": "Stateful" }

This is my test case code:

[TestMethod]
public void Stateful()
{
var workflowName = "Stateful1";
var workflowDefinition = File.ReadAllText($"{workflowName}\workflow.json");
var hostDefinition = File.ReadAllText("host.json");
var localSettingsDefinition = File.ReadAllText("local.settings.json");

        using (new WorkflowTestHost(new WorkflowTestInput[] { new WorkflowTestInput(workflowName, workflowDefinition) }, host: hostDefinition, localSettings: localSettingsDefinition))
        using (var client = new HttpClient())
        {
            // Get workflow callback URL.
            **var response = client.PostAsync(TestEnvironment.GetTriggerCallbackRequestUri(flowName: workflowName, triggerName: "manual"), null).Result;**
            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);

            // Run the workflow.
            response = client.PostAsync(response.Content.ReadAsAsync
Azure Logic Apps
Azure Logic Apps

An Azure service that automates the access and use of data across clouds without writing code.


1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,271 Reputation points Moderator
    2022-06-09T02:57:35.96+00:00

    @Shunmugam, Sugeshkumar I have got an update from my team that Unfortunately there's no easy way of testing service bus triggers besides having it connected to a live Azure service bus resource. The team is actively working on better testing support that will address this problem in future. They will be updating the Logic App Test Framework sample once they have implemented supporting it.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.