Skip to content

Test Query w/2 Shared Section Members - won't recognized that credentials are set #266

@bgribaudo

Description

@bgribaudo

Preflight Checklist

Power Query SDK

0.2.2

Regression From

No response

Platform

Windows

Architecture

x64

OS Version

No response

VSCode version

No response

PQSdkTool Path

No response

Bug Description

Test query with multiple shared members can't be evaluated due to complaint about credentials needing to be set (even though they are set).

Steps to Reproduce

  1. Create a simple connector:
    section Test;
    
    [DataSource.Kind="Test", Publish="Test.Publish"]
    shared Test.Contents = () =>
        "hi";
    
    Test = [ Authentication = [Anonymous = []] ];
    
    Test.Publish = [
        Beta = true,
        Category = "Other",
        ButtonText = { "Title", "Help" }
    ];
    
  2. Create a test query:
    section MyTester;
    
    shared A = Test.Contents();
    
    shared B = Test.Contents();
    
  3. Build the connector (completes successfully)
  4. Set credentials (completes successfully)
  5. Attempt to evaluate the test query file.

Actual Experience

[10:03:42 AM]	[Info]	[Task found] c:\Users\ben\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.2.2-win32-x64\.nuget\Microsoft.PowerQuery.SdkTools.2.114.4\tools\PQTest.exe run-test
				--extension "c:\Users\ben\Desktop\Test\bin\AnyCPU\Debug\Test.mez"
				--queryFile "c:\Users\ben\Desktop\Test\Test.query.pq"
				--prettyPrint
[10:03:45 AM]	[Error]	[Task exited abnormally] pqtest run-test pid(2728) exit(4294967291) stderr: Error: exception while running expression.: Credentials are required to connect to the Test source. (Source at Test.)

Expected Experience

The first shared section member in the test query should run successfully.

Additional Context

Interestingly, the set credentials action does not have a problem with the presence of the two shared section members.

Real life scenario for multiple shared section members in test query: Test query contains unit tests but then a need arises for manual testing. Manual test code is placed in a separate section member above the unit test-containing section member so that it stays untouched.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingsdk toolsIssue is related to the SDK Tools external nuget packages

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions