testing
39 TopicsPart 1 - Develop a VS Code Extension for Your Capstone Project
API Guardian - My Capstone Project As software and APIs evolve, developers encounter significant difficulties in maintaining and updating API endpoints. Breaking changes can lead to system instability, while outdated or unclear documentation makes maintenance less efficient. These challenges are further compounded by the time-consuming nature of updating dependencies and the tendency to prioritize new features over maintenance tasks. The absence of effective tools and processes to tackle these issues reduces overall productivity and developer efficiency. To address this, API Guardian was created as a Visual Studio Code extension that identifies API endpoints in a project and checks their functionality before deployment. This solution was developed to help developers save time spent fixing issues caused by breaking or non-breaking changes and to alleviate the difficulties in performing maintenance due to unclear or outdated documentation. Features and Capabilities This extension has 3 main features: Feature 1. Developers can decide if the extension will scan or skip specified files in the project. Press “Enter” to scan/skip all files. Type the file name (e.g., main.py) and press “Enter” to scan/skip a single file. Type file names with a delimiter (e.g., main.py | pythonFile.py) and press “Enter” to scan/skip multiple files. Feature 2. Custom hover messages when developers mouse over identified APIs This hover message will vary based on the status of the APIs. If the API returns a success status, the hover message will only show the completed API and its status. However, if an error occurs, the hover message will include this additional information: (1) API Name, (2) Official API Link, (3) Error Message, (4) Title of Recommended Fix and (5) Link to the Recommended Fix. Feature 3. Excel Report with Details of Identified APIs After all the identified APIs have been tested, an excel report will exported with the following information to allow developers to easily identify the APIs in the project. What Technology and Products does it involved? Building a Visual Studio Code extension and publishing it to the Visual Studio Marketplace involves a mix of technologies and tools. The project was initiated using the NPM package, generator-code, to set up a JavaScript project for developing the extension. All the extension's logic will be developed and managed within the "extension.js" file generated during the setup process. Once ready for deployment, we will package the extension using "vsce" to generate a ".vsix" file, which will then be used for deployment to the Visual Studio Code Marketplace. The deployment process involves requiring the user to create a publishing account and using tools like vsce to upload and manage the extension's version, updates, and metadata. As part of this process, you would need to create a Personal Access Token (PAT) from Azure DevOps. This token is used to verify your identity and authenticate the publishing tool, allowing you to securely upload your extension to the Visual Studio Marketplace. The PAT provides the necessary permissions for tasks such as version management, publishing new releases, and updating the extension metadata. What did I learn? Throughout this journey, I learned not just about the technical stack but also about the value of detailed project setup and secure publishing processes. While the technical steps can be challenging, they’re incredibly rewarding, and I’m excited to dive deeper into it moving forward. I’m looking forward to exploring how the extension can be further improved and enhanced. If you're interested in learning more about how my API guidance was built, keep an eye out for my next post! API Guardian https://marketplace.visualstudio.com/items?itemName=APIGuardian-vsc.api About the Authors Main Author - Ms Joy Cheng Yee Shing, BSc (Hon) Computing Science Academic Supervisor - Dr Peter Yau, Microsoft MVP311Views0likes0CommentsDeadlocks on High Frequency Updates
Using SQL Server 2022, I'm stress testing an UPDATE statement. I'm using a python script to send parallel requests to the database. The problem is that, as soon as the number of parallel requests exceed max_workers_count, 576 in my case, I get multiple errors of the form: ('40001', '[40001] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Transaction (Process ID 448) was deadlocked on lock | thread resources with another process and has been chosen as the deadlock victim. Rerun the transaction. (1205) (SQLExecDirectW)') I wasn't able to reproduce the error with less requests than max_workers_count. The UPDATE request is the following: UPDATE dbo.UsersAnswer SET UsersSelectionType = ? WHERE For_Question = ? AND For_Quiz = ? AND FK_Answer = ?; Note that, I've tried with and without (UPDLOCK, ROWLOCK) and (UPDLOCK), but it doesn't change the outcome. Also, the updates are done for the same primary key. Finally, the UsersAnswer table is created as follows: CREATE TABLE [dbo].[UsersAnswer]( [For_Question] [smallint] NOT NULL, [For_Quiz] [uniqueidentifier] NOT NULL, [FK_Answer] [int] NOT NULL, [UsersSelectionType] [tinyint] NOT NULL, CONSTRAINT [PK_UsersAnswer] PRIMARY KEY CLUSTERED ( [For_Question] ASC, [For_Quiz] ASC, [FK_Answer] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO ALTER TABLE [dbo].[UsersAnswer] WITH CHECK ADD CONSTRAINT [FK_UsersAnswer_Answer_FK_Answer] FOREIGN KEY([FK_Answer]) REFERENCES [dbo].[Answer] ([PK_Answer]) GO ALTER TABLE [dbo].[UsersAnswer] CHECK CONSTRAINT [FK_UsersAnswer_Answer_FK_Answer] GO ALTER TABLE [dbo].[UsersAnswer] WITH CHECK ADD CONSTRAINT [FK_UsersAnswer_QQ_For_Question_For_Quiz] FOREIGN KEY([For_Question], [For_Quiz]) REFERENCES [dbo].[QQ] ([FK_Question], [FK_Quiz]) ON DELETE CASCADE GO ALTER TABLE [dbo].[UsersAnswer] CHECK CONSTRAINT [FK_UsersAnswer_QQ_For_Question_For_Quiz] GO Do you have any idea on what could cause the deadlock? The deadlock graph is huge, you can find it https://drive.google.com/file/d/1cs_-QULtF0yBsqOIzab56l9oYxKypbUV/view?usp=sharing. Thanks for your insights on this.Solved361Views0likes8CommentsMS Bookings Feedback
I was reseaching and testing Bookings to aid in automated schedule of my teams service requests process. The below information was observed in my tests and I would welcome feedback if these items are truly limitations &/or some items could be caused by the way Bookings is configured for my company's environment. Thank you Custom field information NEEDS to be included within the Booking notification emails confirming the bookings, within MS Teams when viewing the booking, and inside the Outlook calendar invite Today, I am using Power Automate flows to capture the service request details and send these details to my team via email for every new request. My team then has to go into the Sharepoint List to modify each request during its lifecycle which is a cumbersome manual process; & I wanting to eliminate having to go into Sharepoint If I were to move to Booking, there would still be manual process to view the details (Custom Fields) of each request via the online Bookings app; which is not ideal Would be nice to be able to see the custom field information within MS Teams when viewing the booking; I cannot see this information within MS Teams Reporting Enterprises require detail reporting which Bookings fall very short There should be a direct export to Excel vs having to mess around with tab separated value files converting the TSV file The custom field headers to not convert correctly producing a report that is not feasible for leadership No MS Form integration within the MS Bookings Online App only MS Teams Having the ability to inject an existing MS Form data into every booking & have this information available in the Outlook calendar invite, when view the booking in MS Teams, via an export report, etc.; is a must feature many companies Or make the Bookings custom field readily available without having to navigate into the online application, services, edit the service Minimum lead times counts regular hours not business hours nor seems to recognize the current hour when making the booking Ex. I set the min lead time to 72 hours, booking a service on a Thursday or Friday at 1 pm CT shows all day Monday open. I had to change the min lead time to 120 hours to block Monday from being bookable if the booking was made on a Thursday or Friday with 72 hours. Double bookings and Booking algorithm Test scenario: 2 Services A and B created Configured to create MS Teams meeting If Booking created by Staff, Customer can modify the request 1 hour meeting Min lead time 120 hours with Max of 60 days Business hours 9 am- 5 pm CT 3 staff members assigned to the service Customer has ability to choose Anyone or a specific staff member Chose a date and time each of the 3 staff members' Outlook calendars were open As the customer I selected the A service choosing the Anyone option for May 10th at 11 am CT. Bookings created the booking, put a calendar invite on my calendar as the customer & on my team member's calendar as staff (Bookings assigned this booking to another staff member). I went back to book another A service for May 10th at 11 am CT and even though I had the above booking assigned to my Outlook calendar as the customer, it still showed me as available as a Staff member to deliver the service. Why wouldn't Bookings see that I was already booked for this time? Algorithm https://answers.microsoft.com/en-us/msoffice/forum/all/bookings-select-staff-optional-feature/5c16699c-77fa-4ab6-b4bd-1713337f140d For the Select Staff - Anyone feature, it's not designed to distribute appointments by an alphabetical order. The assignment problem is a combinatorial optimization problem, and Bookings uses a set of algorithms to solve this problem. From my limited knowledge, I cannot tell you how these algorithms work exactly, but they may be required to perform as many tasks as possible by assigning at most one agent to each task and at most one task to each agent, so the assignments will be balanced. Thus, you don't need to have the concern that Bookings will distribute assignments randomly or unequally. Testing scenario to try and see the logic behind the algorithm used in Bookings 3 Services A, B, and C Configured to create MS Teams meeting If Booking created by Staff, Customer can modify the request 1 hour meeting Min lead time 120 hours with Max of 60 days Business hours 9 am- 5 pm CT 3 Staff members (George, John, and Rick assigned) Anyone option ONLY First Booking Service A: Chose date and time each Staff member showed available May 10th at 11 am Booking assigned to Rick Second Booking Service B: Chose date and time each Staff member showed available May 10th 1 pm Booking assigned to Rick Third Bookings Service A: Chose date and time each Staff member showed available May 10th 3 pm Booking assigned to John Fourth Bookings Service C Chose date and time each Staff member showed available May 11th 9 am Booking assigned to John Fifth Bookings Service B Chose date and time each Staff member showed available May 11th 2 pm Booking assigned to George Sixth Bookings Service A Chose date and time each Staff member showed available May 11th 4 pm Booking assigned to George The above test showed that Bookings will assign the same person twice before moving to a different person and in alphabetical order. Does this seem accurate as its not "round-robin" or truly a balancing algorithm as described in the above ask Microsoft blog? Bookings page customization My team delivers ~ 20 service items to our core field sales teams; and growing. Having 20 separate individual boxes and only 8 services showing on initial loading of the bookings page with a select more option is not ideal for my customers. It would be nice to have more options to customize the bookings page such as making the service selection a drop-down list.3.8KViews1like1CommentTest Automation and EasyRepro: 01 - Overview and Getting Started
Learn in detail how to use the EasyRepro framework to do automated UI tests of Dynamics 365. You can use it to automate testing such as Smoke, Regression, Load, etc. The framework is built from the Open Source Selenium web drivers used by the industry across a wide range of projects and applications. This article is to walk through the setup of the EasyRepro framework and works with Unit Tests in Visual Studio and GitHub repositories.43KViews3likes10CommentsManaging Workflows with the GitHub Actions Extension for VS Code
GitHub Actions is a powerful feature that enables developers to automate their workflow and save valuable time. With the new GitHub Actions Extension for VS Code, developers have even more flexibility and power at their fingertips. The addon allows developers to design, amend, and run workflows without ever leaving the editor. Features include managing workflows, monitoring workflow runs, and workflow authoring. Syntax highlighting, integrated documentation, and validation and code completion for GitHub Actions Expressions and the YAML schema make editing workflows a breeze. Install the GitHub Actions extension for VS Code and start automating your development workflow today.6.8KViews1like1Comment