Is a workflow test possible on a child-workflow that uses workflow.CreateSession?

I’m trying to create a workflowtest for my workflow. The workflow executes 3 activities of which 2 are running in a worker session. The first activity saves a temporary file that is used by the 2nd activity. I’m mocking the activities, but I get the following error when I try to run the workflow_test.go:

unable to find activityType=internalSessionCreationActivity. Supported types: [GenerateSecretInAppReg, AKSRunningCheck, UpdateSecretValueInKeyVault] (type: ActivityNotRegisteredError, retryable: true)

I receive the error when this line of code is executed:

	require.NoError(t, env.GetWorkflowError())

I have tried :

	env.OnActivity(workflow.CreateSession, mock.Anything, mock.Anything).Return(mock.Anything, nil)
	env.OnActivity(internal.CreateSession, mock.Anything, mock.Anything).Return(mock.Anything, nil)

However, workflow.CreateSession doesn’t add the right activity, and internal.CreateSession is not allowed.

Try setting worker.Options.EnableSessionWorker to true. And then use TestWorkflowEnvironment.setOptions.

Thanks I fixed it with your guidance in the right direction! I placed this in my test:

	workerOptions := worker.Options{
		EnableSessionWorker: true,