How to get Xamarin Test Cloud Device String - xamarin

I am trying to use CI along with Xamarin Test Cloud for an automated CI + Execute test scenario using Visual Studio Online.
While creating a new Xamarin Android build definition, it asks to enter a value for Devices, which is quoted as
The devices string is generated by Xamarin Test Cloud. It can be found as the value of the --devices command line argument of a Test Cloud test run.
Any ideas how can I get this string & from where?
I'm using UiTest & uploaded the test to Xamarin Test cloud from Visual Studio-> Test Project-> Right Click-> Run in Test cloud
help is appreciated.
Thanks
ST

The easiest way to generate a valid --devices string is to go to https://testcloud.xamarin.com/ and select "New Test Run" which you can go through and select your devices. At the final screen named "Submit your tests to finish", you can then grab the --devices parameter value from the generated test-cloud.exe command.

Related

Xcode XCUItest LaunchTests - how do they work

If I create a new Xcode project with Xcode 14 with checked 'Include Tests' checkbox it creates 2 files in the UITests folder:
I am interested in the second one: the [Project]LaunchTests.swift file.
There is this automatically generated code:
func testLaunch() throws {
let app = XCUIApplication()
app.launch()
// Insert steps here to perform after app launch but before taking a screenshot,
// such as logging into a test account or navigating somewhere in the app
let attachment = XCTAttachment(screenshot: app.screenshot())
attachment.name = "Launch Screen"
attachment.lifetime = .keepAlways
add(attachment)
}
If I run this test from the diamond in the code, it runs 4 tests that I can view in the report navigator:
Xcode runs these 4 tests, but I didn't define them anywhere.
Question: where can I find the definition of that tests? Is this kind of an internal testplan which is associated with the LaunchTests file? Where can I find more information about this? It looks like there is a way to run tests with changing light/dark mode and changing orientation without writing a line of code.
Thanks in advance.
If you don't want the four variants of the test to run, then do not (as the template does) return the runsForEachTargetApplicationUIConfiguration value for this test class as true.
As the documentation tells you, when this is true, the test runner consults your actual app target to see what variants it has (light and dark mode, orientations, language localizations).

Unable to run all values from csv file while doing a performance test

Im using VS Web Performance Test Tool.
My Application has a login and few functionalities but doesnt have a logout . I one closes the browser and opens , it asks for login .
Now, i have 5 rows in excel , but only the first is run and it stops.
Please let me know if anyone knows how to make all rows run.
Thanks,
SK
By default, running a Web Performance Test (WPT) only does one execution of the test. A WPT can be called from a Visual Studio Load Test to run it many times by many virtual (i.e. simulated) users (VUs).
A data driven WPT can easily be run more than once by either of two methods.
After the test has been run once, click the "Edit run settings" on the Web Test results viewer. The modified run settings only apply to runs started by clicking the "Click here to run again" and are lost when the Web Test results viewer is closed. See here for more details.
The default can be changed in a .testsettings file. If no such file is already in the solution, then use the context (right click) menu of the solution in Solution Explorer and select Add => New item then follow the prompts to add a Test settings file. The Web test section of the file controls how WPTs are executed. See here for more details.

Test in cloud button has gone

I made a 'Xamarin UI Test' Project to test my app.
I was able to click in the button like this: Run in Test Cloud button.
But now i made my test using the Repl() and want to run it in the cloud the button has gone away.
What i have to do to fix it?
Cause of the Issue
It looks like you are hitting this bug: Bug 52372 - "Run in Test Cloud" option no longer appears in menu on C9
That issue is reported on this version for Xamarin 4.3.0.636. Note that it may happen in other versions but this is the initial version the bug was reported against. You can track the status of that issue either directly in the report on Xamarin's bugzilla, and/or you can watch for a release announcement on the Xamarin Releases Blog.
Workarounds
Downgrading Xamarin
While waiting for a fix to become available, you can downgrade to the previous Cycle 8 version of Xamarin by going to “Get the latest stable version of Cycle 8” section on your account page: https://store.xamarin.com/account/my/subscription/downloads#cycle8.
Uploading to Test Cloud via the Command Line
Alternatively, you can upload tests to the Test Cloud through the command line. To do this log into https://testcloud.xamarin.com & click "New Test Run" at the top. (Note this option is only visible if you have a currently valid Test Cloud account or trial.)
This launches a wizard which will have you pick some options (like whether you want to use Android or iOS; etc.), and at the end will generate a prototype command line. Below is an example for Android:
packages\Xamarin.UITest.[version]\tools\test-cloud.exe submit yourAppFile.apk [API_KEY] --devices [DEVICE_HASH] --series "master" --locale "en_US" --user [EMAIL] --assembly-dir pathToTestDllFolder
Note: I have removed the [API_KEY], [DEVICE_HASH] & [EMAIL] values for privacy reasons, however these will automatically be included when you generate the prototype from the wizard in Test Cloud.
You will still have to manually update the Xamarin.UITest.[version] as well as the actual names and relative paths of yourAppFile.apk & pathToTestDllFolder for this approach to work.

How to create Custom runner

I'm trying to create a new Run button using "custom runner" in order to automatize compilation of C++ files. I mean, I want to create a new Run button that makes g++ -o ... when it's pressed.
I have seen the tutorial for making it, but is not helpful at all, not well explained. Custom Runner Cloud9 tuto
In the Run panel (usually at the bottom of the UI), click the 'Runner' text input and choose 'New Runner'. In the new Runner file that's now opened, you can configure your runner using a simple JSON format.
Where can I find the "Runner text input", I cannot create any one! Here is a capture, what I'm seeing (still cannot upload images :( )
Cloud9 Image
BTW, i'm running Cloud9 in Ubuntu14.04 BeagleBone Black.
Thanks in advance!
From the screenshot I noticed you're using an old version of Cloud9 on the BeagleBone Black, which doesn't support the custom Runners functionality. The documentation at https://docs.c9.io is based on the hosted, new version of Cloud, which does offer this functionality.

How do you link a portion of code to a Test Case with MS Test Manager or TFService 2013?

I am currently using Team Foundation Service 2013. I'm going to give you an example and I want to know if it's possible:
I create an application.
if (testPassed){ Console.WriteLine("The program"); }
I want to select the code and create a test case knowing that my pass test case is related to this portion of code.
Test Case:
Step: Run the program
Expected: The program should output "The program passed!"
The Tester runs the test case and fails it because the output was "The program"
The bug shows up in "My Work" in the "Team Explorer" tab (Which it already does)
I select the test case and it automatically highlights the same code I highlighted as being related to the test case I created.
For anyone that has experience with TFService 2013 or Test Manager, how do I link code in Visual Studio 2013 to a Unit Test? This would be HUUUGE!
You can track code coverage in Microsoft Test Manager when the testers manually execute test cases. I wrote a article on this last year. It isn't exactly what you are asking for but I think it gets close. I haven't tried it in TFService so I'm not 100% sure it will work there.
http://blogs.msdn.com/b/visualstudioalm/archive/2012/11/28/code-coverage-in-microsoft-test-manager-in-visual-studio-update-1.aspx
Mike
I suggest you to link your coding test with id of workitem created in Microsoft Test Manager.
Create test case in Microsoft Test manager
Create test project in visual studio
Create test typed "Coded UI Tests"
Windows appears , select link to id Workitem (Select find button, and edit your query WIQL or enter directly id)

Resources