Get Use Visual Studio for modern development Microsoft Quiz Answers
Want to learn more about using Visual Studio to develop and test apps, but don’t know where to start? Start here! In this learning path you’ll:
- Learn about the main features in the Visual Studio IDE that help you debug, edit, collaborate, and publish your apps.
- Explore software testing concepts.
- Author tests for your product code and use the test explorer in Visual Studio to manage test suites.
Prerequisites:
None
Enroll on Microsoft
Module 1: Introduction to Visual Studio
Visual Studio brings advanced editing, debugging, and customization to your everyday programming tasks. As you program, Visual Studio can help you diagnose issues quickly to get you unblocked and back to building and publishing your apps.
Learning objectives:
By the end of this module, you’ll be able to:
- Evaluate whether Visual Studio is appropriate for your development needs.
- Understand the differences between Visual Studio and Visual Studio Code
- Describe how the editor, debugger, customization, extensions, pair programming, and publishing tools of Visual Studio make you more productive.
Prerequisites:
- Some experience with beginner computer skills like installing an app from the internet.
- Beginner familiarity with programming concepts like running code, editors, and debuggers.
This module is part of these learning paths:
Quiz 1: Knowledge check
Q1. Select the differences between Visual Studio and Visual Studio Code.
- Visual Studio Code isn’t open source.
- Visual Studio Code predates Visual Studio.
- Visual Studio is over 20 years old while Visual Studio Code was first released in 2015.
- Visual Studio Code is an integrated development environment while Visual Studio is a light-weight source code editor.
Q2. What is one tool that enables me to pair program in Visual Studio?
- IntelliCode
- Live Share
- Code fixes
- Extensions
Q3. What ways can Visual Studio help me publish my apps?
- You can publish locally to your machine using the debugger.
- You can publish to Azure.
- You can publish to a Docker container.
- All of the above.
Module 2: Introduction to software testing concepts
Describe the common best practices, theory, and patterns of writing tests. Characterize the types of problems that testing can solve for your repository.
Learning objectives:
By the end of this module, you’ll be able to:
- Evaluate if testing is right for your scenarios.
- Describe how different types of testing, the testing pyramid, and different testing schools of thought answer the demands of modern development.
Prerequisites:
- Ability to write C# at the beginner level, with C# concepts such as writing methods and creating projects.
- Basic familiarity with debugging an app.
This module is part of these learning paths:
Quiz 1: Why we test
Q1. Which of these options is not a benefit of testing?
- Tests encourage a more modular architecture.
- The code coverage tests provide is the ultimate indication of repo health.
- Tests help keep track of the different capabilities of a program.
Q2. The correct code coverage goal in a repo is:
- 100 percent
- 70 percent
- There’s no one true answer. Your code coverage goal depends on the repository.
Quiz 2: Different types of testing and the testing pyramid
Q1. What is the most common type of test?
Q2. If I want to test how my app scales with multiple users using it, what type of test am I likely to write?
- Load
- Integration
- Performance
Quiz 3: Testing schools of thought
Q1. What does TDD stand for?
- Test driven design
- Test driven development
- Technical data development
Q2. What is the best recommended testing approach?
- TDD
- It depends on the needs of the repo and the team!
- BDD
Module 3: C# testing in Visual Studio
Start testing your C# apps by using the testing tools in Visual Studio.
Learning objectives:
By the end of this module, you’ll be able to:
- Create a test project, add references to product code, and write tests.
- View, run, and debug tests in Test Explorer.
- Sharpen your test-writing skills with Fluent Assertions, data-driven tests, and mocking.
Prerequisites:
- Ability to write C# at the beginner level, with C# concepts that include writing methods and creating projects
- Basic familiarity with debugging an app
- Installation of Visual Studio
This module is part of these learning paths:
Quiz 1: Create a test
Q1. What do you need to add a reference from your test project to product code?
- Add a reference to the target project.
- Both import the namespace and add a project reference.
- Import the namespace, add a project reference, and add the @test decorator on the test method.
Q2. Which of the following causes a test to fail?
- A failing assert statement is the only reason a test would fail.
- A test fails when most assertions in the test are failing.
- Tests can fail for various reasons, including at least one failing assertion, an uncaught exception, or test time-out.
Quiz 2: View, run, and debug tests
Q1. How can you run tests in Visual Studio?
- You can run tests only from the right-click menu in Visual Studio.
- You can run tests only from Test Explorer in Visual Studio.
- You can run tests by using the right-click menu, keyboard shortcuts, or CodeLens icons.
Q2. How does the Group By setting in Test Explorer allow you to view test groupings?
- By project
- By class
- By project, by namespace, and then by class
- All of the above, in any order
Quiz 3: Sharpen your test skills
Q1. Say you have one method that you want to test with multiple inputs. What test tool can help you?
- Data-driven tests
- Mocking
- No framework is needed. I should copy and paste the test multiple times and change only the parameters.
Q2. Stubs and shims are found in what test tool?
- Fluent Assertions
- Data-driven tests
- Mocking
Module 4: Interactively debug .NET apps with the Visual Studio debugger
Learn how to efficiently debug your .NET app by using Visual Studio to fix your bugs quickly.
Learning objectives:
By the end of this module, you will be able to:
- Debug a .NET program with the Visual Studio debugger.
- Create breakpoints and run your code step by step to find issues.
- Inspect your program state at any execution step.
Prerequisites:
- Visual Studio with a .NET workload installed (for example, ASP.NET and web development workload)
This module is part of these learning paths:
Quiz 1: Knowledge check
Q1. When you want to write a line to the debug console only when you’re debugging, which API should you use?
- System.Console.WriteLine
- System.Diagnostics.Trace.WriteLine
- System.Diagnostics.Debug.WriteLine
- System.WriteLine
Q2. If you want to write a debug message only when the count is 0
, what code would you use?
Debug.Assert(count != 0, "Count should not be 0.");
Debug.Assert(count == 0, "Count should not be 0.");
Debug.WriteIf(count != 0, "Count should not be 0.");
Debug.WriteIf(count == 0, "Count should not be 0.");
Q3. What are the top two values a debugger provides?
- Control of your program execution and observation of your program’s state
- Modifying program values and changing your program output
- Observing your program’s state and modifying your program values
- Editing your program while running and editing program values
Q4. Which Visual Studio debugger window is most useful to observe the current value of a specific variable across different functions?
- Use the Locals window because it shows all variables that are currently in scope.
- Hover over the variable in the code editor to display the value.
- Use the Watch window to select specific variables or expressions to watch throughout the program’s execution.
- Use the Call Stack window.
Conclusion:
I hope this Use Visual Studio for modern development Microsoft Quiz Answers would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.
This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.
Keep Learning!
More Coding Solutions >>
LeetCode Solutions
Hacker Rank Solutions
CodeChef Solutions